Coding system and decoding system

ABSTRACT

In a coding system wherein an error correction/detection coding is combined with a synchronization code, the problems of a pseudo synchronization and a step out due to error detection are solved. There is provided a coding part for coding an input multiplexed code string to an error correcting/detecting code comprising an information bit and a check bit, and code string assembling part for inserting synchronization code into any one of a plurality of periodically predetermined synchronization code inserting positions in a code string, for arranging the information bit at an optional position in the code string, and for arranging the check bit at a position other than the synchronization code inserting positions in the code string to assemble an output code string.

This application is a continuation-in-part of U.S. patent applicationSer. No. 08/720,067 filed Sep. 27, 1996, now U.S. Pat. No. 5,862,153.

BACKGROUND OF THE INVENTION

The present invention relates generally to a system for transmittingand/or storing information via a medium of a high error rate, such as aradio transmission line. More specifically, the invention relates to acoding and/or decoding system suited to carry out the errorcorrection/detection coding of a compressed code string obtained by thehigh efficiency compression coding to transmit and/or store thecompressed code string.

For example, in a system for carrying out the high-efficient compressioncoding of a picture and/or voice information so as to have a smallinformation content to transmit the compression-coded picture and/orvoice information via a radio transmission line, such as a radio visualtelephone, a portable information terminal and a digital televisionbroadcast system, it is important how to transmit the obtained codestring with a high quality since the transmission line has a high errorrate.

In a case where a code string is transmitted and/or stored via such amedium of a high error rate, an error correcting code, such as aBose-Chaudhuri-Hocquenghem (BCH) code, a Recommended Standard (RS) codeand a convolutional code, is often used as means for reducing the errorrate. In addition, an error correcting code, such as a check sum and acyclic redundancy check (CRC), is used as means for enabling the errorcorrection on the receiving side. The aforementioned error correctionand/or error detection adds excessive bits (redundancy) to thetransmitted and/or stored information in accordance with a predeterminedrule to examine whether the transmitted and/or stored code string obeysthe rule during decoding, to carry out the error correction/detection onthe basis of the results.

However, in such a method for coding a code string obtained by ahigh-efficiency compression coding into error correcting/detecting codesto transmit and/or store the codes, there is a disadvantage in that itis difficult to be combined with a synchronous recovering technique forrecovering a step out caused by a code word error in the transmissionline/medium. As a synchronous recovering technique, a method forinserting a uniformly decodable code called a synchronization code toresume the decoding immediately after the synchronization code isdetected when a step out occurs is often used.

In order to make a uniformly decodable code word of the synchronizationcode, the code word must be combined with another code word so as not toform the same bit pattern as the synchronization code. However, in anerror correction/detection coding, it is generally difficult to form acode word so as to prevent a certain bit pattern from occurring. Whenthe same bit pattern as the synchronization code occurs, a pseudosynchronization may be caused by the error detection of thesynchronization code.

In order to avoid this problem, there is used a method for preventingthe pseudo synchronization by determining whether the same bit patternas the synchronization code exists in the code string after performingthe error correction/detection coding, inserting a dummy bit into thebit pattern in accordance with a certain rule when the same bit patternexists, and deleting the dummy bit in the same rule in a decodingsystem. However, in a case where the code string is transmitted and/orstored via a medium in which errors are easy to occur, errors may occurin the inserted bit, so that there is a problem in that a new step outor a new pseudo synchronization may occur.

In addition, in a case where the error correction/detection coding of acode string is carried out to insert a synchronization code, there isalso a problem in that the coding efficiency is lowered since it isrequired to add many inserted bits to the code string in order tocompensate an excess of information bits, for which the error detectionand/or detection coding is to be carried out, at the end portion of asynchronization interval between the adjacent synchronization codes.

On the other hand, in order to enhance the error correcting/detectingcapability, the redundancy of the transmitted and/or stored informationmay be enhanced. However, if the redundancy is enhanced, the number ofbits required to transmit the same information is increased. Therefore,if the error correcting/detecting capability is enhanced, it is requiredto provide a transmission line of a higher transmission rate, or thenumber of bits of information to be stored is increased. In addition, ifthe transmission rate and the stored capacity are the same, the amountof information, which can be transmitted and/or stored, is decreased asthe redundancy is enhanced. In a case where a picture and/or voiceinformation is high-efficiently compression-coded to be transmittedand/or stored, in order to add the redundancy to improve the errorresistance, the compression coding into a smaller amount of informationmust be carried out if the transmission and/or storage rate is the same,so that the picture quality and sound quality are lowered.

Therefore, as a method for providing a smaller redundancy and a higherror resistance, there is a method called hierarchical coding. This isa method for enhancing the error resistance using the same meansredundancy in comparison with when the same error correcting/detectingcode is used, by classifying the high-efficiency compression-codedinformation in accordance with the magnitude of errors influencing thepicture quality and the sound quality, using an errorcorrecting/detecting code of a higher error correction/detectioncapacity while having a high redundancy, for information under a greatinfluence of the error, and using an error correcting/detecting code ofa less redundancy while having not so high error correction/detectioncapacity, for information which is not so greatly influenced by theerror.

For example, in a coding system, which is formed by combining themotion-compensated prediction with the orthogonal transform and which isoften used for the high-efficiency compression coding of a dynamicimage, i.e., in a system for motion-compensation predicting an inputdynamic image signal to orthogonal transform its prediction residue bythe discrete cosine transform (DCT) or the like, the errorcorrecting/detecting codes of a high error correcting/detectingcapability are used for motion vector information, which greatlydeteriorate the picture quality if an error occurs, and for lowercoefficients of the orthogonal transformation coefficients of theprediction residual signal, and the error correcting/detecting codes ofa low error correcting/detecting capability are used for highercoefficients of the orthogonal transformation coefficients of theprediction residual signal, which are under a small influence of theerror.

In order to achieve such a hierarchical coding, it is required to switchthe error correcting/detecting codes of different errorcorrecting/detecting capabilities in the middle of the output codestring. As a method for switching the error correcting/detecting codesof different error correcting/detecting capabilities, there is a methodfor adding a header information representative of the kind of the errorcorrecting/detecting codes to a code string. FIG. 11 shows an example ofa code string, to which the header information is added to switch theerror correcting/detecting codes. In this example, two kinds of errorcorrecting/detecting codes FEC1 and FEC2 are switched. The headers 1101to 1104 have a header information representative of the kind of theerror correcting/detecting codes and the number of the code words. In acoding system, code words, which are error correction/detection coded,are arranged after the header information. In a decoding system, theheader information is decoded, and the error correcting/detecting codesare decoded in accordance with the decoding of the header information.

However, in the method for switching the error correcting/detectingcodes by adding such a header information, there is a problem in thatthe number of bits of the code string to be transmitted and/or stored byadding the header information is increased. In a case where the pictureand/or voice information is high-efficiency compression coded to betransmitted and/or stored, if the number of bits is occupied by theheader information, the number of bits used for the high-efficiencycompression coding of the picture and/or voice information is decreased,so that the picture quality and sound quality are deteriorated.

As mentioned above, if the error correction/detection coding of the codestring, in which the high-efficiency compression coding of dynamic imagesignals and so forth is performed, is carried out, an optional bitpattern is produced. Therefore, in a case where the error,correction/detection coding is combined with the synchronous recoveringtechnique using a uniformly decodable synchronization code, there is aproblem in that a pseudo synchronization is caused by the errordetection of the synchronization code. Also in a case where the dummybit is inserted to prevent the pseudo synchronization, there is aproblem in that a new step out or a new pseudo synchronization is causedby the error of the inserted bit.

In addition, in a case where the error correction/detection coding ofthe code string is performed and the synchronization code is inserted,it is conventionally required to use many inserted bits to compensate anexcess of information bits, for which the error detection and/ordetection coding is to be carried out, at the end portion of asynchronization interval between the adjacent synchronization codes, sothat there is a problem in that the coding efficiency is lowered.

Moreover, in a coding/decoding system for switching errorcorrecting/detecting codes of different error correcting/detectingcapabilities by adding a header information, the number of bits to betransmitted and/or stored by adding the header information is increased.Therefore, in a case where a picture and/or voice information ishigh-efficiency compression coded to be transmitted and/or stored, thereis a problem in that the information content assigned to the pictureand/or voice information is decreased to lower the picture quality andthe sound quality.

SUMMARY OF THE INVENTION

It is therefore a principal object of the present invention to eliminatethe aforementioned problems and to provide coding and decoding systems,which can prevent a pseudo synchronization and a step out due to theerror detection of a synchronization code.

It is another object of the present invention to provide coding anddecoding systems, which prevent a pseudo synchronization and a step outdue to the error detection when an error correction/detection coding iscombined with a synchronization recovering technique using asynchronization code.

It is further object of the present invention to provide coding anddecoding systems, which can decrease the number of inserted bits used atthe end portion in a synchronization interval to enhance the codingefficiency, when an error correction/detection coding;j is combined witha synchronization recovering technique using a synchronization code.

It is still further object of the present invention to provide codingand decoding systems which can decrease the number of bits of a codestring, to which a header information representative of the kind oferror correction/detection coding must be added and which is transmittedand/or stored, to improve the quality of information.

(1) A first coding system, according to the present string to an errorcorrecting/detecting code comprising an information bit and a check bit;and code string assembling means for inserting a synchronization codeinto any one of a plurality of predetermined synchronization codeinserting positions in an output code string, for arranging theinformation bit at an optional position in the output code string, andfor arranging the check bit at a position other than the synchronizationcode inserting positions in the output code string to assemble theoutput code string.

A first decoding system, according to the present invention, comprises:synchronization code detecting means for detecting a synchronizationcode at a plurality of predetermined synchronization code insertingpositions on the basis of a code string, which is coded to an errorcorrecting/detecting code comprising an information bit and a check bit;code string resolving means for resolving the code string to extract theinformation bit of the error correcting/detecting code and the check bitof the error correcting/detecting code arranged at a position other thanthe synchronization code inserting positions; and decoding means forreceiving the information bit and the check bit extracted by the codestring resolving means to decode the error correcting/detecting code.

Thus, in the first coding/decoding system, the synchronization codeexists only at the predetermined synchronization code inserting positionin the output code string, and the check bit of the errorcorrecting/detecting code exists at a position other than thesynchronization code inserting position. Therefore, even if the same bitpattern as the synchronization code is contained in the check bit, thereis no probability that it is erroneously detected that the same bitpattern as the synchronization code is a synchronization code.Accordingly, since it is not required to use a special errorcorrecting/detecting code for preventing a particular bit pattern and toinsert a bit for preventing a synchronization code after the errorcorrection/detection coding, the degree of freedom for the used errorcorrecting/detecting code can be increased. In addition, since there isno probability that a new synchronization detection error may occur dueto the insertion of an error into an inserted bit, it is possible toimprove the resistance to errors.

(2) In a second coding system according to the present invention, codestring transforming means is added to the first coding system. The codestring transforming means transforms an input code string other thansynchronization codes arranged at a plurality of predeterminedsynchronization code inserting positions in an output code string sothat a humming distance from the synchronization code is equal to orgreater than a predetermined value. The code string transformed by thecode string transforming means is inputted to coding means to be codedto an error correcting/detecting code comprising an information bit anda check bit.

In a second decoding system according to the present invention, codestring transforming means is added to the first decoding system. Thecode string transforming means transforms a code string other than thesynchronization code, which exists at a synchronization code insertingposition and which is transformed so that a humming distance from thesynchronization code in the code string decoded by the decoding means isequal to or greater than a predetermined value, into the original codestring.

Thus, in the second coding/decoding system, the coding system carriesout the transforming process so that the humming distance from thesynchronization code with respect to a bit string arranged at thesynchronization code inserting position is equal to or greater than apredetermined value, and the decoding system carries out the reversetransformation. Therefore, since the same bit pattern as thesynchronization code is not contained in the bit string, it is possibleto prevent the error detection of a synchronization code. In addition,if the transform is carried out so that the humming distances betweenthe synchronization code and the other code strings are great, thesynchronization code can be distinguished from the other code stringseven if an error is mixed into the code strings, so that the probabilityof the error detection of the synchronization code due to errors can bedecreased.

Since this transforming/inverse transforming process is carried out onlyat the synchronization code inserting position, the overhead is lessthan those in conventional methods for carrying out transforming/inversetransforming process over the whole code string. In addition, in thecode string inputted to the coding system, it is not required to carryout the transforming process so as not to produce the same bit patternas the synchronization code, and it is not required to use a specialcode string. In particular, in a case where a variable length codingsystem for switching and using different code word tables is used as aninput of this coding system, if the code word table is prepared so asnot to produce the same pattern as the synchronization code in thevariable length coding system, there is a problem in that the codingefficiency is lowered. However, the second coding/decoding system caneliminate such a problem.

(3) A third coding system, according to the present invention,comprises: coding means for coding an input code string to an errorcorrecting/detecting code; synchronization code inserting means forinserting a synchronization code into the code string; and determiningmeans for determining the number of bits an information to be coded toan error correcting/detecting code immediately before thesynchronization code in the code string, wherein the coding means causesthe error correcting/detecting code immediately before thesynchronization code, to be a degenerate code, which adaptivelydegenerated on the basis of the number of bits determined by thedetermining means.

A third decoding system, according to the present invention, comprises:decoding means for decoding a code string, which is coded to an errorcorrecting/detecting code and into which a synchronization code isinserted; synchronization code detecting means for detecting thesynchronization code in the code string; and determining means fordetermining the number of bits of an information, which is coded to anerror correcting/detecting code immediately before the synchronizationcode in the code string detected by the synchronization code detectingmeans, wherein the decoding means decodes by identifying whether theerror correcting/detecting code immediately before the synchronizationcode is a degenerate code on the basis of the determined result of thedetermining means.

Thus, in the third coding/decoding system, since a degenerate codedegenerated to the number of bits required to code the information bitremaining at the end portion of a synchronization interval is used asthe error correcting/detection code immediately before thesynchronization code, it is not required to use many inserted bits inorder to compensate the remainder of the information bit at the endportion of the synchronization interval, so that the coding efficiencycan be improved.

(4) A fourth coding system, according to the present invention,comprises: coding means for coding a code string containing kinds ofinput information to an error correcting/detecting code; and switchingmeans for switching the kind of the error correcting/detecting code inaccordance with the kinds of the input information in the code string.

A fourth decoding system, according to the present invention, comprises:decoding means for decoding a code string, which is coded to a differentkind of error correcting/detecting code in accordance of the kind ofinformation, to generate the original information; and means fordetermining the kind of the error correcting/detecting code on the basisof the kind of information generated by the decoding means, to informthe decoding means.

Thus, in the fourth coding/decoding system, in a case where thecoding/decoding is carried out by switching the errorcorrecting/detecting code in accordance with the kind of information,the coding system switches the error correcting/detecting code inaccordance with the kind of information of the input code string, andthe decoding system determines the kind of the errorcorrecting/detecting code on the basis of the decoded information tocarry out the same switching as that of the coding system. Therefore, itis not required to use a header information representative of the kindof the error correcting/detecting code unlike conventional systems, sothat it is possible to remove the overhead due to the headerinformation.

(5) A fifth coding system, according to the present invention,comprises: code string transforming means for transforming an input codestring other than synchronization codes, which are arranged at aplurality of predetermined synchronization code inserting positions inan output code string and in intervals of a predetermined number of bitsbefore and after the predetermined synchronization code insertingpositions in an output code string, so that a humming distance from thesynchronization code is equal to or greater than a predetermined value;coding means for coding a code string transformed by-the code stringtransforming means, to an error correcting/detecting code comprising aninformation bit and a check bit; and code string assembling means forinserting a synchronization code into any one of a plurality ofpredetermined synchronization code inserting positions in the outputcode string, for arranging the information bit at an optional positionin the output code string, and for arranging the check bit at a positionother than the synchronization code inserting positions in the outputcode string to assemble the output code string.

A fifth decoding system, according to the present invention, comprises:synchronization code detecting means for detecting a synchronizationcode at a predetermined synchronization code inserting position and inan interval of a predetermined number of bits before and after thepredetermined synchronization code inserting position, on the basis of acode string, which is coded to an error correcting/detecting codecomprising an information bit and a check bit and into which thesynchronization code; code string resolving means for resolving the codestring to. extract the information bit of the error correcting/detectingcode and the check bit of the error correcting/detecting code arrangedat a position other than the synchronization code inserting position;decoding means for receiving the information bit and the check bitextracted by the code string resolving means to decode the errorcorrecting/detecting code; and code string transforming means fortransforming a code string other than the synchronization code, which istransformed so that a humming distance from the synchronization code inthe code string decoded by the decoding means is equal to or greaterthan a predetermined value and which exists at the synchronization codeinserting position and in an interval of a predetermined number of bitsbefore and after the synchronization code inserting position, into theoriginal code string.

Thus, in the fifth coding/decoding system, the input code string istransformed in the synchronization code inserting interval as well as inthe interval of the predetermined number of bits before and after thesynchronization code inserting interval so that the humming distance isequal to or greater than the predetermined value, and the decodingsystem carries out the reverse transformation of the input code string,so that the same bit pattern as the synchronization code is notcontained in this interval. Therefore, even if the transmission/storageof a bit string coded through a transmission line or a storage mediumfor causing a bit loss, in which a part of bits is lost, and a bitaddition, in which an excess bit is added, is carried out, thesynchronization code can be distinguished from the other code strings ifthe number of lost/added bits is equal to or less than a predeterminednumber of bits, so that the decoding system can correctly carry out thesynchronization detection.

(6) A sixth coding system, according to the present invention,comprises: multiplexing means for multiplexing kinds of compressedcodes, which are obtained by compression coding an input signal, toproduce a multiplexed code string; and code string assembling means forinputting the multiplexed code string to assemble an output code string,wherein the code string assembling means inserts a synchronization codeinto any one of a plurality of periodically predeterminedsynchronization code inserting positions in the output code string.

In this case, in order to insert the synchronization code into any oneof the plurality of periodically predetermined synchronization codeinserting positions in the output code string, the code stringassembling means inserts a stuffing bit into the output code string, orperiodically determines the plurality of synchronization code insertingpositions in the output code string and inserts an information (apointer information) representative of the boundary of the multiplexedcode string, to insert the synchronization cod e into any one of theplurality of synchronization code inserting positions. Thus, thesynchronization code can be inserted only into any one of the pluralityof periodically predetermined synchronization code inserting positions.

The stuffing bit is preferably a code, which can be uniformly decoded ina backward direction of the output code string. Thus, if the decodingsystem compares the decoding end position of the code string immediatelybefore the stuffing bit with the starting position of the stuffing bit,it is possible to easily detect an error in the input code string.

Moreover, the humming distances of the stuffing bit from thesynchronization code and the part thereof are preferably equal to orgreater than a predetermined value. Thus, there is an advantage in thatthe probability of the occurrence of a pseudo synchronization.

A sixth decoding system, according to the present invention, comprises:synchronization code detecting means for detecting a synchronizationcode in an output code string; demultiplexing means for demultiplexingon the basis of the position of the synchronization code detected by thesynchronization code detecting means from the input code string, toproduce a compressed code string; and decoding means for decoding thecompressed code to output a reconstructed signal, wherein thesynchronization code detecting means detects the synchronization code ata plurality of periodically predetermined synchronization code insertingpositions in the input code string.

Thus, in the case of the sixth coding/decoding system, since the codingsystem inserts the synchronization code into the multiplexed codestring, which is obtained by multiplexing kinds of compressed codes,only at the periodically predetermined synchronization code insertingpositions, the decoding system may carry out the synchronizationdetection only at the synchronization code inserting positions, so thatthe number of synchronization code detecting processes can be decreasedin comparison with conventional systems for inserting a synchronizationcode into a code string at an optional position. In addition, inaccordance with the decrease of the number of the synchronization codedetecting processes, it is possible to decrease the probability that apseudo synchronization occurs because of the bit string inputted to thedecoding system changed to the same bit pattern as the synchronizationcode due to bit error. Therefore, according to the present invention, itis possible to decrease the number of the occurrences of the pseudosynchronization, so that the processing quantity in the synchronizationcode detection can be decreased.

(7) In a seventh coding system according to the present invention, codestring transforming means is added to the sixth coding system. The codestring transforming means transforms a code string other than saidsynchronization code, which is arranged at said synchronization codeinserting position in said output code string, so that a hummingdistance from said synchronization code is equal to or greater than apredetermined value.

A seventh decoding system, according to the present invention, furthercomprises: code string transforming means for transforming a code stringother than the synchronization code, which is transformed so that ahumming distance from the synchronization code is equal to or greaterthan a predetermined value at the synchronization code insertingposition of the input code string, into the original code string.

Thus, in the seventh coding/decoding system, in addition to theconstruction of the sixth coding/decoding system, the bit insertion inview of the error of the synchronization code, i.e., the transformationof the humming distance of the bit string arranged at thesynchronization code inserting position from the synchronization code,is carried out, so that the same bit pattern as the synchronization codeis contained in the bit code string. Therefore, it is possible to ensurethat the error detection of the synchronization code does not occur withrespect to an error of a supposed number of bits or less, so that it ispossible to decrease the probability of the error detection of thesynchronization code.

Furthermore, in the present invention, the synchronization code is acode string, which is inserted into a code string for synchronizationrecovery and which can be uniformly decoded. For example, if a codestring for inserting a synchronization code is a multiplexed codestring, which is obtained by multiplexing a plurality of kinds ofcompressed codes obtained by compression coding an image signal inputtedfor each frame, the synchronization code is a code representative of apartition of a coding frame, partitions of the plurality of kinds ofcompressed codes, and other partitions.

As described above, according to the present invention, the followingadvantages can be obtained.

(1) According to the first coding/decoding system, the synchronizationcodes are inserted only into the synchroni-zation code insertingpositions arranged at regular intervals, and the check bits of the errorcorrecting/detecting code are shifted so as to exist at positions otherthan the synchronization code inserting positions. Therefore, even ifthe same bit pattern as the synchronization code occurs in the checkbit, the same pattern as the synchronization code does not occur at thesynchronization code inserting position, and, in theory, there is noprobability that synchronization is detected.

In addition, if the bit insertion into a code string at thesynchronization code inserting position is carried out so as not toproduce a pseudo synchronization code, it is possible to eliminate thedifficulty in forming a code word so as not to produce the same bitpattern as the synchronization bit.

(2) According to the second coding/decoding system, in addition to theconstruction of the first coding system, the bit insertion is carriedout in view of the synchronization code, i.e., the transforming processis carried out so that the humming distance from the synchronizationcode is equal to or greater than the predetermined value with respect tothe bit string arranged at the synchronization code inserting position,and the decoding system carries out the backward transformation, so thatthe bit code does not contain the same bit pattern as thesynchronization code. Therefore, it is possible to ensure to prevent theerror detection of the synchronization code from occurring due to theerrors of the supposed number of bits or less, so that the probabilityof the error detection of the synchronization code is decreased. Inaddition, if such transformation is carried out, it is possible todistinguish the synchronization code from the other code strings even ifan error is mixed into the code string, so that the probability of theerror detection of the synchronization code due to errors can bedecreased.

Moreover, since the error correction/detection coding is carried outafter the code word is transformed by the bit insertion, the errorprotection is carried out for the inserted bit. Therefore, in comparisonwith conventional systems for carrying out the bit insertion after theerror correction/detection coding, the probability that an error occursin the inserted bit is decreased. In addition, since the bit insertionis carried out only into the synchronization code inserting position,the increase of the quantity of cods due to the bit insertion is smallerthan that in conventional systems for carrying out the bit insertionover the whole code string, so that the coding efficiency is improved.

(3) According to the third coding/decoding system, since the errorcorrecting/detecting code immediately before the synchronization code isa degenerate code, it is possible to decrease the number of insertedbits for compensating the remainder of the information bit at theportion immediately before the synchronization code, to improve thecoding efficiency, in comparison with conventional coding systems.

(4) According to the fourth coding/decoding system, the coding systemutilizes the multiplexing rule in the high-efficiency compression codingsystem, such as image and voice, and switches the errorcorrecting/detecting code in accordance with the kind of the informationof an input code string, and the decoding system determines the kind ofthe error correcting/detecting code on the basis of the decodedinformation to carry out the same switching as that of the codingsystem. Therefore, it is not required to add the header informationrepresentative of the kind of the error correcting/detecting code, andit is possible to assign the number of bits to high efficiencycompression coding, such as image and voice, so that it is possible toimprove the information quality, such as picture quality and soundquality.

(5) According to fifth coding/decoding system, the coding systemtransforms an input code string so that a humming distance in asynchronization code inserting interval as well as a humming distance inan interval of a predetermined number of bits before and after thesynchronization code inserting interval are equal to or greater than apredetermined value, and the decoding system carries out the inversetransformation of the input code string, so that it is possible toprevent the same bit pattern as the synchronization code from beingcontained in this interval. Therefore, even if a bit string codedthrough a transmission line and/or a storage medium, which may cause abit loss for losing a part of bit is lost and a bit addition for addingan excess bit, is transmitted/stored, if the number of lost/added bitsis equal to or less than a predetermined number of bits, it is possibleto distinguish a synchronization code from other code strings, so thatthe decoding system can correctly carry out the synchronizationdetection.

(6) According to the sixth coding/decoding system, since the codingsystem inserts synchronization codes only into synchronization codeinserting positions periodically predetermined in a multiplexed codestring, which is obtained by multiplexing kinds of compressed codes, thedecoding system may carry out the synchronization detection only at thesynchronization code inserting positions, so that the number of thesynchronization code detecting processes can be decreased in comparisonwith conventional systems for inserting synchronization codes into acode string at optional positions.

In addition, since the probability that a pseudo synchronization occursby the variation of the bit string inputted to the decoding system intothe same bit pattern as the synchronization code, is decreased inaccordance with the decrease of the number of the synchronization codedetecting processes, it is possible to prevent the pseudosynchronization according to the present invention, so that theprocessing quantity for the synchronization code detection decreases.

(7) According to the seventh coding/decoding system, in addition to theconstruction of the sixth coding/decoding system, the bit insertion inview of the error of the synchronization code, i.e., the transformationof they hamming distance of the bit string at the synchronization codeinserting position from the synchronization code is carried out, so thatthe same bit pattern as the-synchronization code is not contained in thebit string. Therefore, it is ensured that the error detection of thesynchronization code does not occur with respect to errors of thesupposed number of bits, so that the probability of error detection ofsynchronization codes can be decreased.

BRIEF DESCRIPTION OF THE DRAWINGS

In the drawings:

FIG. 1 is a block diagram of the first and second preferred embodimentsof a dynamic image coding system according to the present invention;

FIG. 2 is a diagram illustrating a multiplexing rule in a multiplexer ofthe dynamic image coding system of FIG. 1;

FIG. 3 is a block diagram of an output coding unit of the dynamic imagecoding system of FIG. 1;

FIG. 4 is a diagram illustrating an example of an output code string ofthe dynamic image coding system of FIG. 1;

FIG. 5 is a diagram illustrating an example of a synchronization code;

FIG. 6 is a block diagram of an error correction/detection switchingcoding part in the output coding unit of FIG. 3;

FIG. 7 is a block diagram of a code string assembling unit of the outputcoding unit of FIG. 3;

FIG. 8 is a block diagram of the first and second preferred embodimentsof a dynamic image decoding system according to the present invention;

FIG. 9 is a block diagram of an input decoding unit of the dynamic imagedecoding system of FIG. 8;

FIG. 10 is a block diagram of a code string resolver of the inputdecoding unit of FIG. 9;

FIG. 11 is a diagram illustrating an example of a code string obtainedby a conventional error correction/detection switching coding system;

FIG. 12 is a diagram illustrating an example of a synchronization code,in which an error is caused by the addition/loss of a bit(s) in atransmission line, for explaining the second preferred embodiment of thepresent invention;

FIG. 13 is a diagram explaining the operation of a bit inserting unit ofFIG. 3 in the second preferred embodiment;

FIG. 14 is a diagram explaining the operations of a synchronizationdetector and an inserted bit removing unit of FIG. 9 in the secondpreferred embodiment;

FIG. 15 is a diagram illustrating an example of a code string, in whicha synchronization protection is carried out using a frame lengthinformation in the first and second preferred embodiments;

FIG. 16 is diagram illustrating another example of a code string, inwhich a synchronization protection is carried out using a frame lengthinformation in the first and second preferred embodiments;

FIG. 17 is diagram illustrating further example of a code string, inwhich a synchronization protection is carried out using a frame lengthinformation in the first and second preferred embodiments;

FIG. 18 is a block diagram of the third and fourth preferred embodimentsof a dynamic image coding system according to the present invention;

FIG. 19 is a block diagram of an output coding unit of the thirdpreferred embodiment of a dynamic image coding system according to thepresent invention;

FIG. 20 is a diagram illustrating an example of an output code string ofthe third preferred embodiment of a dynamic image coding systemaccording to the present invention;

FIG. 21 is a block diagram of the third and fourth preferred embodimentsof a dynamic image decoding system according to the present invention;

FIG. 22 is a block diagram of an input decoding unit of the thirdpreferred embodiment of a dynamic image decoding system according to thepresent invention;

FIG. 23 is a block diagram of an output coding unit of the fourthpreferred embodiment of a dynamic image coding system according to thepresent invention;

FIG. 24 is a block diagram of an input decoding unit of the fourthpreferred embodiment of a dynamic image decoding system according to thepresent invention;

FIG. 25 is a block diagram of an example of an output code string of thefourth preferred embodiment of a dynamic image coding system accordingto the present invention;

FIG. 26 is a diagram illustrating a multiplexing rule in a multiplexerof a dynamic image coding system;

FIG. 27 is a block diagram of examples of output code strings of thefifth preferred embodiment of a dynamic image coding system according tothe present invention;

FIG. 28 is a diagram illustrating other examples of multiplexing rulesin a multiplexer of a dynamic image coding system;

FIG. 29 is a diagram of an output code string, in which synchronizationcodes are processed when the multiplexing shown in FIG. 28 is carriedout;

FIG. 30 is a code table for explaining examples of stuffing bits usedfor the present invention;

FIG. 31 is a diagram explaining a process in a decoding system when thestuffing bits of FIG. 30 are used;

FIG. 32 is a diagram explaining the characteristics of the stuffing bitsof FIG. 30;

FIG. 33 is a diagram of examples of output code strings when asynchronization code inserting interval is shorter than asynchronization code;

FIG. 34 is a diagram of examples of the use of synchronization codes ofdifferent lengths;

FIG. 35 is a diagram of examples of output code strings of the sixthpreferred embodiment of a dynamic image coding system according to thepresent invention;

FIG. 36 is a block diagram of the seventh preferred embodiment of acoding system according to the present invention;

FIG. 37 is a block diagram of the seventh preferred embodiment of adecoding system according to the present invention;

FIG. 38 is a diagram of dynamic image code strings used for the seventhpreferred embodiment of the present invention;

FIG. 39 is a diagram illustrating the arrangement of synchronizationcodes and the construction of stuffing bits;

FIG. 40 is a block diagram of a multiplexer;

FIG. 41 is a diagram of an example of outputs of an adaptation layer;

FIG. 42 is a diagram of examples of outputs of a multiplexing layer;

FIG. 43 is a diagram illustrating a first embodiment of a method fordelimiting a dynamic image code string in an adaptation layer;

FIG. 44 is a diagram illustrating a second embodiment of a method fordelimiting a dynamic image code string in an adaptation layer;

FIG. 45 is a diagram illustrating a third embodiment of a method fordelimiting a dynamic image code string in an adaptation layer;

FIG. 46 is a diagram illustrating a fourth embodiment of a method fordelimiting a dynamic image code string in an adaptation layer;

FIG. 47 is a diagram illustrating a fifth embodiment of a method fordelimiting a dynamic image code string in an adaptation layer;

FIG. 48 is a diagram illustrating a sixth embodiment of a method fordelimiting a dynamic image code string in an adaptation layer;

FIG. 49 is a diagram illustrating a seventh embodiment of a method fordelimiting a dynamic image code string in an adaptation layer;

FIG. 50 is a diagram illustrating an eighth embodiment of a method fordelimiting a dynamic image code string in an adaptation layer;

FIG. 51 is a diagram explaining an example of stuffing in an adaptation;

FIG. 52 is a diagram of a second example of a multiplexer;

FIG. 53 is a diagram of an example of a code string produced in a FlexMux layer of the multiplexer of FIG. 52;

FIG. 54 is an explanatory drawing, which illustrates the boundary of anaccess unit and the arrangement of a resynchronizing marker in a framein the seventh embodiment;

FIG. 55 is an explanatory drawing, which illustrates the boundary of theaccess unit and the arrangement of the resynchronizing marker in theframe when being switched from the state of FIG. 54; and

FIG. 56 is an explanatory drawing of a code string illustrating anexample of an access unit corresponding to FIG. 55.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

Referring now to the accompanying drawings, the preferred embodiments ofthe present invention will be described below.

First Preferred Embodiment

FIG. 1 is a block diagram of the first preferred embodiment of a dynamicimage coding system, according to the present invention, wherein acoding system having an error correcting/detecting code switchingfunction of the present invention is combined with a high-efficiencycompression coding system which uses a motion-compensated adaptiveprediction and a discrete cosine transform coding serving as a kind ofan orthogonal transform coding. A coding system comprising thecombination of a motion-compensated adaptive prediction and a discretecosine coding is detailed in, e.g., Literature 1 “International Standardof Multimedia Coding” by Hiroshi Yasuda, Maruzen (June 1991). Therefore,only the operation of the coding system will be schematically described.In addition, it is assumed that information bits are separated fromdetection bits in an error correcting/detecting code similar to a BCHcode.

In FIG. 1, with respect to an input dynamic image signal 131 serving asan object to be coded, which is inputted for each frame, amotion-compensated adaptive prediction is first carried out for eachsmall region, such as a macro block. That is, in a motion-compensatedadaptive predictor 101, a motion vector between an input dynamic imagesignal 131 and an image signal, which is stored in a frame memory 102and which has been encoded and/or locally decoded, is detected, and aprediction signal 132 is produced by the motion-compensated predictionon the basis of the motion vector. In this motion-compensated predictor101, a prediction mode suitable for coding is selected from themotion-compensated prediction coding and the intraframe coding(prediction signal=0), which directly encodes the input dynamic imagesignal 131, to produce the corresponding prediction signal 132.

The prediction signal 132 is inputted to a subtracter 103, wherein theprediction signal 132 is subtracted from the input dynamic image signal131 to output a prediction residual signal 133. The prediction residualsignal 133 is discrete-cosine-transformed (DCT) in a discrete cosinetransformer 104 for each block having a predetermined size to produce aDCT coefficient. The DCT coefficient is quantized by means of aquantizer 105. The DCT coefficient data quantized by the quantizer 105are divided into two parts, one of which is variable-length-encoded bymeans of a first variable length encoder 106, and the other of which isinverse-quantized by means of an inverse quantizer 107 to beinverse-discrete-cosine-transformed (inverse DCT) by means of an inversediscrete cosine transformer 108. The output of the inverse discretecosine transformer 108 is added to the prediction signal 132 in an adder109 to produce a locally decoded signal. This locally decoded signal isstored in the frame memory 102.

On the other hand, the information on the prediction mode and the motionvector, which have been determined by the motion-compensated adaptivepredictor 101, is variable-length-encoded by means of a second variablelength encoder 110. The variable length codes (compressed codes)outputted from the first and second variable length encoders 106 and 110are multiplexed by means of a multiplexer 111 to be outputted as amultiplexed code string 201.

The multiplexer 11 outputs the multiplexed code string 201, a FEC kindidentifying signal 202 representative of the kind of an errorcorrecting/detecting code corresponding thereto, and a synchronizationcode insertion request signal for requesting to insert a synchronizationcode. The code string 202, the FEC kind identifying signal 202 and thesynchronization code insertion request signal 203 are inputted to anoutput coding unit 200 for switching and encoding the code string 202 tokinds of error correcting/detecting codes of different errorcorrecting/detecting capabilities, to produce a final output code string205. In this preferred embodiment, the output coding unit 200corresponds to a coding system according to the present invention.

FIG. 2 is a diagram illustrating a multiplexing flow in the multiplexer111. The multiplexing is carried out for each coding frame. First, asynchronization code 301 is multiplexed. When the synchronization code301 is multiplexed, the synchronization code insertion request signal203 is outputted from the multiplexer 111, and the coding system 200 hasnotice that the multiplexed code word is a synchronization code. Then,picture headers 203 representative of various coding modes of the codingframe are multiplexed to be the multiplexed code string 201. Then, aprediction mode information 303 representative of a prediction mode in amotion-compensated adaptive predictor MC in each region is multiplexed,and a motion vector information 304 and a DCT coefficient 305 of apredictive residual signal (hereinafter referred to as a “residual DCTcoefficient”) are multiplexed. When the picture header 302, theprediction mode information 303, the motion vector information 304 andthe residual DCT coefficient 305 are multiplexed, the FEC kindidentifying signals 202 representative of the kind of errorcorrecting/detecting codes corresponding thereto are outputted.

The error correcting/detecting codes of high correcting/detectingcapabilities are used for the picture header 302, the prediction modeinformation 303 and the motion vector information 304, which greatlydeteriorate the picture quality if an error is mixed. On the other hand,if an error is mixed into the residual DCT coefficient 305, it ispossible to prevent the picture quality from greatly deteriorating bydetecting the error and setting the residue to be zero. Therefore, theerror correcting capacity is not required to be high, and only the errordetection may be carried out.

FIG. 3 is a block diagram of an output coding unit of FIG. 1. The outputcoding unit 200 comprises a bit inserting unit 211, an errorcorrection/detection switching encoder 212 and a code string assemblingunit 213. FIG. 4 shows an example of an output code string 205 producedby the output coding unit 200. In FIG. 4, PSC denotes a synchronizationsignal, PH denotes a picture header, MODE denotes a prediction modeinformation, MV denotes a motion vector, CHK denotes a check bit of anerror correcting/detecting code, DOEF is a residual DCT coefficient, andSTUFF denotes a stuffing bit (an inserted bit). This output code string205 has the following characteristics.

(1) The synchronization codes PSC are inserted into only synchronizationcode inserting positions indicated by arrows, which are arranged atregular intervals (every sync_period bits). The length of thesync_period is set to be greater than the length of the synchronizationcode PSC and the maximum length of the check bit CHK. The check bit CHKis shifted so as to be arranged immediately before the synchronizationcode inserting position.

(2) The error correcting/detecting code at the end part of a frame,i.e., a synchronization period between a synchronization code PSC andthe next PSC, is a degenerate code for encoding only the finallyremaining information bit, and the stuffing bits STUFF having the numberof bits required to displace the check bit CHK (CHK6 in the example ofFIG. 4) are inserted.

(3) The FEC kind identifying signal representative of the kind andnumber of the error correcting/detecting codes does not exist in theoutput code string 205 of FIG. 4.

In this output code string 205, since the check bit CHK is displaced asdescribed in (1), no check bit CHK enters the synchronization codeinserting positions indicated by the arrows, so that there is noprobability that a pseudo synchronization is produced by the check bitCHK. In addition, in a case where the error correction/detection codingof the end of the frame is carried out as described in (2), it has beenrequired to insert many inserted bits (dummy bits) in the prior art.However, in this preferred embodiment, since the end of the frame hasthe degenerate code, the number of inserted bits may be small. Moreover,as described in (3), since the header information representative of thekind and number of the error correcting/detecting codes are contained inthe output code string 205, the amount of codes is not increasedtherefor.

Comparing the multiplexed code string 201 of FIG. 2 outputted from themultiplexer 111 with the output code string 205 of FIG. 4, theconstruction and operation of the output coding unit 200 of FIG. 3 forproducing such an output code string 205 will be described in detailbelow.

When the synchronization code 301 is multiplexed in the multiplexer 111,the synchronization code insertion request signal 203 is outputted asdescribed above. For example, as shown in FIG. 5, the synchronizationcode 301 comprises “0”s of sync_(—)0_len bits, a “1” of one bit, and a“xxxxx” of sync_nb_len bits representative of the kind of thesynchronization code 301. The output coding unit 200 outputs asynchronization code (PSC) serving as an output code string 205 from thecode string assembling unit 213 when receiving the synchronization code301 and the synchronization code insertion request signal 203 from themultiplexer 111.

As shown in FIG. 4, since the synchronization code 301 can be insertedonly at the synchronization code inserting positions arranged atintervals of sync_period bits, when the end of the output code string205 produced is not arranged at the synchronization code insertingposition, a stuffing bit STUFF is inserted so that the synchronizationcode 301 is arranged at the synchronization code inserting position asdescribed later.

After the synchronization code 301 is outputted to the output codestring 205, the picture header 302, the prediction mode information 303,the motion vector information 304 and the residual DCT coefficient 305are encoded as follows. The bit insertion into the multiplexed codestring 201 outputted from the multiplexer 111 is carried out to preventa pseudo synchronization from occurring in the bit inserting unit 211.That is, if the same bit pattern as the code word of the synchronizationcode 301 exists in the output code string 201, the bit insertion iscarried out, if necessary, in order to prevent the synchronization code301 from being not able to be uniformly decoded. For example, in a casewhere the synchronization code 301 is a code word having continuous “0”sof sync_(—)0_len bits as shown in FIG. 5, if a “1” is inserted so that“0”s of the sync_(—)0_len bits or more do not continue in code stringsother than the synchronization code 301, it is possible to prevent apseudo synchronization from being produced.

As described above, since the synchronization codes 301 are insertedonly at the synchronization code inserting positions, the bit insertingoperations for preventing the pseudo synchronization from occurring maybe carried out only at the synchronization code inserting positions.Therefore, a counted value 221 representative of the total number ofbits of the output code strings 205 produced is outputted from the codestring assembling unit 213, and it is determined by the bit insertingunit 211 on the basis of the counted value 221 whether the bit insertionis required. Assuming that the counted value 221, i.e., the total numberof bits of the output code strings 205 produced, is total_len, thenumber of “1”s in the multiplexed code string 201 is counted in aninterval wherein 0<total_len mod sync_period≦sync_(—)0_len. If no “1”exists in this interval, a “1” of one bit is inserted. A mod B denotes aremainder when A is divided by B.

In addition, in order to decrease the probability of the error detectionof the synchronization code 301, the bit insertion may be carried out asfollows.

In order to detect the synchronization code 301 even if an error of nbits is mixed into the synchronization code 301, it is required todetermine that a code word having a hamming distance of n or less from atrue synchronization code in an input decoding unit of a dynamic imagedecoding system as described later is a synchronization code. However,if such a determination is carried out while the code strings other thanthe synchronization code 301 are as they are, bit patterns having ahamming distance of n or less from the synchronization code may existeven in the code strings other than the synchronization code 301.Therefore, if this is arranged at the synchronization code insertingposition, it may be erroneously determined to be the synchronizationcode 301.

Therefore, the bit insertion into the multiplexed code string 201 iscarried out by means of the bit inserting unit 211, so that the codestrings other than the synchronization codes arranged at thesynchronization code inserting positions in the multiplexed code string201 are transformed so as to have a hamming distance of 2*n+1 or morefrom the synchronization code 301. Specifically, the number of “1”s(assumed to be n0) is counted in an interval wherein 0<total_len modsync_period≦sync_(—)0_len−(2*N+1). If n0 is equal to or less than 2*n+1,“1”s of 2*n+1−n0 bits are inserted into the multiplexed code string 201.

Thus, a code string 222, in which the bit insertion is carried out bymeans of the bit inserting unit 211, together with the FEC kindidentifying signal 202 representative of the kind of an errorcorrecting/detecting code, is inputted to the error correcting/detectingcode switching encoding part 212.

FIG. 6 is a block diagram of an error correcting/detecting codeswitching encoding part 212. A latch circuit 603 is a circuit forlatching a FEC kind identifying signal 202. When the output of asynchronization code from the multiplexer 111 to the multiplexed codestring 201 is completed to stop the output of the synchronization codeinsertion request signal 203, the latch circuit 603 latches the FEC kindidentifying signal 202 to supply a latched signal 623 to an errorcorrection/detection encoder 604.

An error correction/detection encoder 604 carries out the errorcorrection/detection coding of a code string 222, which is outputtedfrom a bit inserting unit 211, on the basis of the latched signal 623 tooutput an information bit 631 and a check bit 632. In addition, when theerror correction/detection coding, of one block is completed, the errorcorrection/detection encoder 604 outputs a latch indicating signal 625,which indicates the latch of the next FEC kind identifying signal 202,to the latch circuit 603. The latch circuit 603 latches in accordancewith the latch indicating signal 625 to supply the latched signal 623 tothe error correction/detection encoding 604.

The aforementioned operation is repeated in the output coding unit 200,so that the error correction/detection coding of the bit-inserted codestring 222 outputted from the bit inserting unit 211 is carried outwhile switching the error correcting/detecting code in the errorcorrect-ion/detection switching encoder 212 on the basis of the FEC kindidentifying signal 202 outputted from the multiplexer 111. Since the FECkind identifying signal 202 is latched by the latch circuit 603 only atthe time that the coding of the error correcting/detecting code of oneblock is completed, the same error correcting/detecting codes areapplied before this switching point. For example, in a case where thepicture header 302 uses an error correcting/detecting code FEC1 and theprediction mode information 303 uses an error correcting/detecting codeFEC2, if the number of bits of the picture header 302 is smaller thanthe number of information bits of one block of the FEC1, the FEC1 isused as the error correcting/detecting code of the subsequent predictionmode information 303 until the number of bits of the picture header 302reaches the number of information bits of the FEC1.

FIG. 7 is a block diagram of a code string assembling unit 213 of FIG.3. The code string assembling unit 213 comprises a counter 701 forcounting the number of bits of the output code string 205, a buffer 702for temporarily storing the check bit 632 and the number of bitsthereof, a switch 703 for switching the output code string 205, and aswitch controller 704 for controlling the switch 703.

The counter 701 is reset to be a value of a synchronization code lengthsync_len when the synchronization code insertion request signal 203 isinputted, and counts up sequentially from the next bit of thesynchronization code until the next synchronization code is inputted.The switch 703 is operated so that the information bit 631 is outputtedbefore the initial check bit 632 is inputted after the synchronizationcode is inputted. When the check bit 632 is inputted, it is stored inthe buffer 702 and the number of bits thereof (the number of check bits)711 is outputted from the buffer 702 to the switch controller 704.

The switch controller 704 controls the switch 703 on the basis of thenumber 711 of check bits and the counted value 221 of the counter 701 sothat the check bit is displaced in order to prevent the check bit 632from being outputted to the synchronization code inserting position asdescribed above. For example, assuming the counted value 221 isbit_count and the number 711 of check bits is check_len, the informationbit 631 is outputted when bit_count modsync_period<sync_period−check_len, and a check bit 713 stored in thebuffer 702 is outputted when sync_period−check_len≦total_bits modsync_period<sync_period. Thereafter, the aforementioned process isrepeated while the information bit 631 and the check bit 632 areinputted.

As described above, since the output coding unit 200 uses a degeneratecode as an error correcting/detecting code at the end portion of oneframe and performs the bit insertion to displace the check bit, itperforms operation different from usual operations of portions otherthan the end portion. That is, when the output of the multiplexed codestring 201 of one frame is completed, the multiplexer 111 outputs asynchronization code insertion request signal 203 for the next frame. Inresponse thereto, the error correction/detection code 604 in the errorcorrection/detection switching encoding part 212 of FIG. 6 performs theerror correction/detection coding using a degenerate code, assuming thata shortage of the information bits 631 of the error correcting/detectingcode is a predetermined bit pattern outputted from an inserted bitgenerator 705. This bit pattern may be a bit pattern wherein all bitsare “1”s or “0”s, or may be a specific repeated pattern such as “0101 .. . ”. This compensated inserted bits are not outputted to theinformation bit 631.

In the code string assembling unit 213 of FIG. 7, after the informationbit 613 is outputted to the end, the switch 713 is switched from the bitgenerator 705 to the input, and the inserted bits are inserted so thatthe check bit 713 stored in the buffer 702 is arranged immediatelybefore the next synchronization code. Assuming that the counted value221 of the counter 701 is total_len when the last information bit 631 ofone frame is outputted and that the number of the finally outputtedcheck bits 632 is last_check_len, the number of inserted bitsstuffing_len is stuffing_len=sync_period−last_check_len−(total_len modsync_period). Furthermore, in a case where no degenerate code is used,it is required to insert (into_len−last_into_len) bits, which is ashortage of the last information bit last_into_len from the usualinformation bit into_len, and to insert a shortage of bits fordisplacing the check bit. Therefore, it is required to insert moreinserted bits than those in the use of the degenerate code, byinto_len−last_into_len+(into_len−last_into_len) mod sync_period.

Thus, after the code string assembling unit 213 outputs the informationbits 631 and the inserted bits to the output code string 205 via theswitch 703, and it finally outputs the check bit 713 to the output codestring 205.

The first preferred embodiment of a dynamic image decoding system,according to the present invention, will be described below.

FIG. 8 is a block diagram of a dynamic image decoding systemcorresponding to the dynamic image coding system of FIG. 1. The outputcode string 205 outputted from the dynamic image decoding system of FIG.1 passes through a transmission/storage system to be inputted to aninput decoding unit 800 as an input code string 205′. In this preferredembodiment, the input decoding unit 800 corresponds to a decoding systemof the present invention.

The input decoding unit 800 switches error correcting/detecting codes onthe basis of a FEC kind identifying signal 802 representative of thekind of an error correcting/detecting code outputted from a downstreamdemultiplexer 811, to output a code string 801, which has been errorcorrection/detection encoded, a synchronization code detection signal803 and an error detection signal 804. The demultiplexer 811 receivesthe code string 801, the synchronization code detection signal 803 andthe error detection signal 804 to separately output a predictionresidual signal 841 and a motion-compensated adaptive predictioninformation code 842.

The prediction residual signal 841 and the motion-compensated adaptiveprediction information code 842 are inputted to first and secondvariable length decoders 806 and 810, respectively. For a residual DCTcoefficient 831 decoded by the first variable length decoder 806, aseries of processes are carried out, i.e., the inverse quantization iscarried out by means of an inverse quantizer 807 and the inversediscrete cosine transform is carried out by means of an inverse DCT unit808. Then, the processed residual DCT coefficient is added to amotion-compensated adaptive prediction signal 832, which is an output ofthe motion-compensated adaptive predictor 801, in an adder 809 to beoutputted as a reconstructed image signal 850. The reconstructed imagesignal 850 is outputted to the outside of the system and recorded in aframe memory 820. The motion-compensated adaptive prediction informationdecoded by the second variable length decoder 810 is inputted to themotion-compensated adaptive predictor 801 to produce themotion-compensated adaptive prediction signal 832.

The aforementioned processes are processes for producing a dynamic imageso as to correspond to the dynamic image coding system of FIG. 1. Theprocesses of the inverse quantizer 807, the inverse DCT unit 808, theadder 809 and the frame memory 820 are basically the same as those theinverse quantizer 107, the inverse DCT unit 108, the adder 109 and theframe memory 102 although the realizing means may be different. Inaddition, the processes in the first and second variable length decoders806 and 810, the demultiplexer 811 and the input decoding unit 800 areinverse processes to those in the variable length encoders 106 and 110,the multiplexer 111 and the output coding unit 200, except for the casethat an error is mixed into the code string.

FIG. 9 is a block diagram of the input decoding unit 800. The inputdecoding unit 800 comprises a synchronization detector 901 for detectinga synchronization code in the input code string 205′, a counter 902 forcounting the number of bits of the input code string 205′, a code stringresolver 903 for resolving a code string into information bits 912 andcheck bits 913, an error correction/detection decoder 904, and aninserted bit remover 905.

The synchronization detector 901 detects synchronization codes only atthe synchronization code inserting positions on the basis of the countedvalue 911 of the counter 902. For example, assuming that the intervalbetween the adjacent synchronization code inserting positions issync_period, the counted value 911 is bit_count, and the length of thesynchronization code is sync_len, the synchronization detection iscarried out only when 0<bit_count % sync_period≦sync_len.

Furthermore, the synchronization code may be detected in view of errorsin the synchronization code.

In the bit inserting unit 211 of the output coding unit of FIG. 3, ifthe code string is transformed by inserting bits so as to have a hummingdistance of 2*n+1 or more from the synchronization code in view oferrors of n bits or less, even if it is determined that the code stringhaving a humming distance of n or less from a true synchronizationsignal is a synchronization code, error synchronization detection doesnot occur when the error of n bits or less is mixed.

FIG. 10 is a block diagram of the code string resolver 903. The inputcode string 205′ is switched into information bits 1021 and check bits913 by means of a first switch 1002 controlled by a controller 1001which will be described later. When the information bits 1021 areoutputted from the first switch 1002, an information bit length of theinformation bits 1021 are transmitted to a buffer 1004 via a secondswitch 1003 to be stored therein. A counter 1005 counts the number ofoutput bits from the second switch 1003. A comparator 1006 compares acounted value 1023 of the counter 1005 with an information bit length1024 outputted from an error correcting/detecting code informationoutput unit 1007. When both are the same, the counter 1005 is reset, theFEC kind identifying signal 802 representative of the kind of an errordetecting/correcting code is latched by means of a latch circuit 1008,and the buffer 1004 outputs the information bit 904. The output 914 ofthe latch circuit 1008 is inputted to the error correcting/detectingcode information output circuit 1007, and outputted to the errorcorrection/detection decoder 904 shown in FIG. 9.

As described above, the check bits of the error correcting/detectingcode are displaced to be arranged between the information bits of theerror correcting/detecting code after the code string 205. Thecontroller 1001 controls so that the displaced check bits are separatedfrom the information bits. When the input of the information bits of theerror correcting/detecting code of one block is completed, the countedvalue 1023 corresponds to the information bit length 1024 in thecomparator 1006. In response thereto, the controller 1001 receives acheck bit length 1025 from the error correction/detection informationoutput unit 1007, and calculates the positions of the check bitsarranged between the next information bits. When it is determined by thecomparator 1006 that both correspond to each other, assuming that thecounted value 911 of the number of input bits of the code string 205′ isbit_count and the check bit length is check_len, the check bit startingposition check_start ischeck_start=(bit_count/sync_period+1)*sync_period−check_len, and thecheck bit end position check_end ischeck_end=(bit_count/sync_period_(—)+1)*sync_period. The controller 1001controls the switch 1002 so that the check bits 913 are outputted fromthe check_start to the check_end of the counted value 911.

Since the end of one frame is a degenerate code and the errorcorrection/detection encoding thereof is carried out, it is speciallyprocessed. When reaching the end of one frame, a signal 803representative of the detection of the next frame is outputted. Inresponse to this signal 803, the controller 1001 calculates thepositions of the check bits of the last error correcting/detecting codeof the frame and the number of insufficient bits of the informationbits. It is assumed that the counted value 911 of the number of bits ofthe code string 205′ inputted when starting to input the last errorcorrecting/detecting code of one frame is pre_last_count, the countedvalue 911 when the input of the code string 205′ of one frame iscompleted is total_count, the counted value 911 during the process isbit_count, the check bit length of the last error correcting/detectingcode of one frame is last_check_len, and the check bit length of theerror correcting/detecting code immediately before of the last errorcorrecting/detecting code is pre_last_check_len. First, the excess anddeficiency of information bits due to the error correcting code being adegenerate code and due to the insertion of bits is calculated. Amongthe information bits of the last error correcting/detecting code of oneframe, the number of bits contained in the output code string 205,last_info_len, islast_info_len=total_count−last_check_len−pre_last_count−pre_last_check_len.When last_info_len is shorter than the information length of the errorcorrecting code info_len, it is determined that the error correctingcode is a degenerate code. In addition, when the counted value 1023 isin the range of from last_into_len to info_len, the switch 1021 isswitched to a bit pattern outputted from an inserted bit generator 1015,to make up for the deficiency of information bits due to degeneracy. Theoutput bit pattern from the inserted bit generator 1015 generates thesame bit pattern as that of the inserted bit generator 705 of FIG. 7 ofthe encoder.

On the other hand, when last info_info_len is longer than info_len, itis determined that the error correcting code is the inserted bit part,so that the information bits 912 are not outputted for the portionwherein the counted value 1023 is equal to or greater than info_len.With respect to the check bits, the switch 1002 is controlled so as tooutput, as check bits, the output code string 205 whentotal_count−check_len<bit_count≦total_count.

The error correction/detection decoder 904 receives the information bits912 and the check bits 913, which are outputted from the code stringresolver 903, and decode the error correcting/detecting code on thebasis of the FEC kind identifying signal 914 representative of the kindof the error correcting/detecting code latched by the latch circuit 1008of FIG. 10, to output an error corrected code string 915 and an errordetection signal 804.

The error corrected code string 915 is inputted to the inputted bitremover 905. The inserted bit remover 905 removes the inserted bits forpreventing the pseudo synchronization signal inserted by the bitinserting unit 211 of the output coding unit 200. As described above,since the bit insertion is carried out only at the synchronizationinserting position, the synchronization inserting position is determinedon the basis of the counted value 911 of the counter 902.

For example, when the synchronization code word is that shown in FIG. 5and when the bit inserting unit 211 inserts bits into the portion “0000. . . ” of the first sync_len bits of the synchronization code so thatthe humming distance from the synchronization code is greater than2*n+1, the number of “1”s (=n0) of “sync_(—)0_len−(2*n+1)” bits from thesynchronization code inserting position is counted. When the n0 is equalto or less than 2*n+1, 2*n+1−n0 bits are removed. However, since it isdetermined that the inserted bit is “1”, when the bit determined as theinserted bit by the inserted bit removing unit 905 is “0”, it isconsidered that an error is mixed in the synchronization code insertinginterval. In this case, the error detection signal 804 is outputted.

Thus, the code string 801 decoded by the input decoding unit 800 isinverse multiplexed by means of the demulti-plexer 811. This isoperation for separating and outputting the multiplexed code word asshown in FIG. 2. This inverse multiplexer 811 works with the first andsecond variable length decoders 806 and 810.

First, when the synchronization code detection signal 803 is inputtedfrom the output decoding system 800, the demultiplexer 811 returns tothe initial state of the frame process. Then, the kind of the errorcorrecting/detecting code to the picture header is outputted as the FECkind identifying signal 802 representative of the kind of the errorcorrecting/detecting code, and the code string 801 is inputted to decodethe picture header 302, so that it is determined whether there is noerror in the picture header. When there is no error, the kind of theerror correcting/detecting code to the prediction mode information 303is outputted as the FEC kind identifying signal 802, and the code string801 is inputted to demultiplex the prediction mode information to outputit to the second variable length decoder 810.

When all the prediction mode information is decoded, the second variablelength decoder 810 outputs a signal representative thereof to thedemultiplexer 811. In response thereto, the demultiplexer 811 outputs aFEC kind identifying signal representative of the kind of an errorcorrecting/detecting code to the motion vector information 304, andstarts the demultiplexing of the motion vector information 304. Thedemultiplexed motion vector information is outputted to the secondvariable length decoder 810 to be decoded. When the decoding of all themotion vector information is completed, a signal representative thereofis outputted from the second variable length decoder 810 to thedemultiplexer 811. In response thereto, the demultiplexer 811 outputs aFEC kind identifying signal representative of the kind of an errorcorrecting/detecting code to the residual DCT coefficient, anddemultiplexes the residual DCT coefficient 305 which is outputted to thefirst variable length decoder 806.

As described above, the kind of the error correcting/detecting code isdetermined on the basis of the multiplexing rule which is defined in thedemultiplexer 811 so as to be the same as that of the output coding unit200. Therefore, the output code string 205 is not required to containthe header information representative of the error correcting/detectingcode and so forth.

In the error correction/detection decoder 904, it may be detected by theerror detection code that an error is mixed in the input code string205′. In addition, as described above, an error of the inserted bits maybe detected by the inserted bit removing unit 905. In these cases, theerror detection code 804 is outputted from the input decoding unit 800.Moreover, when a code word, which does not exist in the variable lengthcode word table, is detected in the variable length decoding process, itis determined that an error is mixed. In addition, when it is determinedthat a part is against the multiplexing rule in the demultiplexingprocess in the demultiplexer 811, it is determined that an error ismixed. In these cases, the input decoding unit 800 and the demultiplexer811 carry out the following processes so as not to greatly deterioratethe reconstructed image.

(1) When an error is detected in the residual DCT coefficient, theresidue of the corresponding part is set to be 0. When a intra codingmode is selected as a prediction mode, the reconstructed image signal inthe corresponding region may be predicted on the basis of thereconstructed image signal in the reconstructed frame and thesurrounding region.

(2) In a case where an error is detected in the prediction modeinformation and the motion vector, when the prediction mode informationand the motion vector information in the region, in which the error isdetected, can be presumed on the basis of the prediction modeinformation and the motion vector information in the surrounding region,the presumed information are used. When it is impossible, thereconstructed image signal in the corresponding region is predicted onthe basis of the reconstructed image signal in the reconstructed frameand the surrounding region.

(3) When an error is detected in a picture header, if the picture headeris used as it is, there is probability that the picture quality is verygreatly deteriorated. Therefore, the reconstructed image of the lastframe is used as the reconstructed image of the current frame.

In the aforementioned processes (1), (2) and (3), when the error has theinfluence on the subsequent codes to the next synchronization codebecause of the use of the variable length coding, the same processes arecarried out for that portion.

While it has been described that the synchronization code detector 901detects synchronization codes only at the synchronization code insertingpositions (at intervals of sync_period bits), the loss of bits and/orthe insertion of error bits may occur in a transmission/storage medium.In such a case, the synchronization codes may be detected at positionsother than the synchronization code inserting positions, and it may bedetermined that the positions, at which the synchronization codes aredetected, are synchronization code inserting positions.

Second Preferred Embodiment

Referring to FIGS. 12 through 14, the second preferred embodiment of thepresent invention will be described below.

In this preferred embodiment, a dynamic image coding system and adynamic image decoding system can surely detect synchronization even ifa code string is transmit-ted/stored in a transmission line/storagemedium in which the number of bits is decreased due to the loss of apart of a bit string or the number of bits is increased due to theaddition of excessive bits.

FIG. 12 is a block diagram showing the principle of a process fordetecting synchronization when such addition/loss of bits occurs. It isassumed herein that the right synchronization code comprises “0”s ofsync_(—)0_len bits and a “1” of one bit as shown in FIG. 12(a).Furthermore, in FIG. 12, “x” denotes a bit other than a synchronizationcode.

FIGS. 12(b) through 12(e) show how the synchronization code is changedby the addition/loss of bits. It is assumed herein that the number ofadded/lost bits (Nid) is one bit at the maximum. FIG. 12(b) shows thatone bit is eliminated from a bit string before a synchronization code,so that the whole synchronization code is shifted forwards by the onebit. FIG. 12(c) shows that one bit is added to a bit string before asynchronization code, so that the whole synchronization code is shiftedbackward by the one bit. FIG. 12(d) shows that a bit is eliminated froma synchronization code, so that the bits after the bit eliminatingposition indicated by the arrow are shifted forward by one bit.Moreover, FIG. 12(e) shows that one bit is added to a synchronizationcode at the bit adding position indicated by the arrow, so that the bitsafter the bit adding position are shifted backwards by the one bit.

In order to correctly detect synchronization even if the addition/lossof bits occurs, it is required to determine that the bit strings shownin FIGS. 12(b) through 12(e) are synchronization codes. As can be seenfrom FIG. 12, the number of “1”s contained in the interval of ±Nid bitsat the right synchronization code inserting positions issync_(—)0_len−3*Nid bits at the maximum. Therefore, synchronization maybe detected in the interval of ±Nid bits at the synchronization codeinserting positions on the decoding side, and if the number of “1”scontained in this range is less than the aforementioned value, it may bedetermined to be a synchronization code. In addition, in the codingsystem, code strings are transformed so that bit patterns of FIGS. 12(b)through 12(d) do not occur.

Mainly with respect to the difference from the first preferredembodiment, such coding/decoding systems will be described below.

The whole construction of the second preferred embodiment of a dynamicimage coding system, according to the present invention, is the same asthat of the first preferred embodiment of a dynamic image coding system,except for the operation of the bit inserting unit 211 of FIG. 3. FIG.13 shows the operation of the bit inserting unit 211. That is, in thebit inserting unit 211 in the first preferred embodiment, the bitinserting operation is carried out only at the synchronization codeinserting interval. On the other hand, in the bit inserting unit 211 inthe second preferred embodiment, the bit insertion is carried out in asynchronization code inserting interval of ±Nid bits in order to preventthe same bit pattern as the synchronization code from being producedeven if the addition/loss of Nid bits occurs at the maximum.

Assuming that the counted value 221 in FIG. 3 is total_len and theinterval between the adjacent synchronization code inserting positionsis sync_period, the bit inserting unit 221 counts the number of “1”s(assumed to be=n0) in the region of total_len modsync_period=sync_(—)0_len−1−3*Nid on the basis of total_len modsync_period=sync_period−Nid (mod: excess operation), and inserts “1”s of“3*Nid+1−n0” if n0 is less than 3*Nid+1.

FIG. 13 shows an example of the operation of the bit inserting unit 211when sync_period=12, sync_(—)0_len=9, and Nid=1. In this example, sincen0=2, “1”s of 3*Nid+1−n0=2 bits are inserted.

By such bit insertion, it is ensured that the number of “0”s of ±Nidbits in the synchronization code inserting interval is equal to orgreater than 3*Nid bits, so that it is possible to uniformly identifysynchronization codes.

On the other hand, the whole construction of the second preferredembodiment of a dynamic image decoding system, according to the presentinvention, is the same as that of the first preferred embodiment, exceptfor the operations of the synchronization detector 901 and the insertedbit remover 905 in FIG. 9. FIG. 14 shows the operation of an insertedbit remover 905.

That is, the synchronization detector 901 detects synchronization codesin the range of ±Nid bits before and after the synchronization codeinserting position, in order to detect synchronization even if theaddition/loss of Nid bits occurs at the maximum.

First, it is determined whether synchronization codes exist at everysynchronization code inserting position. That is, assuming that thecounted value 911 of the counter 902 is bit_count, the number of “0”s(assumed to be=ns0) in the range of bit_count modsync_period=sync_(—)0_len−1+Nid is counted on the basis of bit_count modsync_period=sync_period−Nid. When n0 is below 3*Nid, it is determinedthat a synchronization code exists in this region.

FIG. 14 shows operation when sync_period=12, sync_(—)0_len=9, and Nid=1.In this example, the number of “0”s is counted in the range that(bit_count mod sync_period) is from “1” to “8”. In the example of FIG.14, since ns0=2, it is determined that a synchronization code exists.

Then, it is determined what bits the code string is shifted by theaddition/loss of bits in the synchronization code inserting interval, inwhich it is determine that a synchronization codes exists. In the caseof sync_(—)0_len bits shown in FIG. 14, the shifted amount from theposition of the last “1” is determined. Specifically, after searching a“1” which first appears from the (sync_(—)0_len+1 bits) th from the headof the synchronization code determining region, it is derived which bitthe searched “1” is from the head of this synchronization codedetermining region (assuming that this is first_(—)1_position bit). Onthe basis of the derived results, the shifted amount is derived from“the number of shifted bits=first_(—)1_pos−(sync_(—)0_len+1+Nid)”(forward shift in the case of negative, and backward shift in the caseof positive). In the example of FIG. 14, since first_(—)1_pos=10, thenumber of shifted bits=10−(9+1+1)=−1, so that it is found that the codestring is shifted forward by one bit.

Unlike the first preferred embodiment, in the inserted bit remover 905,the inserted bit removing process is carried out in the interval of ±Nidbits before and after the synchronization code inserting position. Thatis, on the basis of bit_count mod sync_period=sync_period−Nid, thenumber of “1”s (assumed to be=n0) is counted in the region of bit_countmod sync_period=sync_(—)0_len−1−3*Nid. When the n0 is equal to or lessthan 3*Nid+1, the “1”s of 3*Nid+1−n0 bits are removed.

In the second preferred embodiment, if the region, in which theaddition/loss of bits occurs in a transmission line or a storage medium,can be determined by some method, the synchronization detecting process,the bit inserting process and the bit removing process, which considerthe addition/loss of bits, may be carried out only in that region.

Furthermore, also in the dynamic image decoding system in the firstpreferred embodiment as described above, the synchronization detectioncorresponding to the addition/loss of bits in a transmission line and/ora storage medium is carried out Therefore, the synchronization detector901 may detect synchronization in the synchroni-zation code insertinginterval, i.e., in the interval of ±Nid bits, similar to the secondpreferred embodiment. In this case, although a pseudo synchronization,which is erroneously determined to be a synchronization code while beinga portion other than the synchronization code, may be produced, it ispossible to inhibit the quality of a reproduced image from beingdeteriorated due to synchronization detection error in a transmissionline and/or a storage medium which tends to cause the addition/loss ofbits, so that the picture quality can be improved.

In addition, if the region, in which the addition/loss of bits occurs ina transmission line and/or a storage medium, can be determined by someprocess, that process may be carried out only in that region, and ausual synchronization detection may be carried out in other regions.

Moreover, in the first and second preferred embodiments as describedabove, the synchronization may further protected using informationrepresentative of the length of a frame (which will be hereinafterreferred to as a “frame length information”). FIGS. 15, 16 and 17 showexamples of code strings using a frame length information POINTER.

In the example of FIG. 15, a frame length information POINTER and acheck bit CHKP of an error correcting/detecting code for protecting theframe length information POINTER are arranged immediately after asynchronization code PSC. The number of bits of the last frame, i.e.,information representative of the number of bits from thesynchronization code of the last frame to the synchroni-zation code ofthe current frame, is stored in the frame length information POINTER.

The coding system counts the number of bits a code string of one frameto transform the counted number into a frame length POINTER, and carriesout the error correction/detecting encoding to produce a check bit CHKP.Then, as shown in FIG. 15, the coding system produces a code stringimmediately after the synchronization code of the next frame.

On the other hand, after the decoding system detects synchronizationcodes by the same method as those in the first and second preferredembodiments, it takes the subsequent frame length information POINTERand the check bit CHKP out of the code string, and carries out the errorcorrection/detection decoding to decode the frame length informationPOINTER. Then, the decoded frame length information POINTER is comparedwith a value derived by counting the number of bits from the lastdetected synchronization code to the current synchronization code (framelength counted value), to check whether there is no error detection ofsynchronization codes.

If the frame length counted value is different from the code length ofthe last frame indicated in the frame length information POINTER, thereis probability that a synchronization code is erroneously detected, sothat the erroneously detected synchronization code is detected againusing the frame length information POINTER. That is, it is assumed thata synchronization code, which could not detected, exists before thecurrent synchronization code by the number of bits indicated by theframe length information POINTER. In this case, the interval between thelast detected synchronization code and the current synchronization codeis divided into two frames, i.e., the interval between the lastsynchronization code and the position indicated by the frame lengthinformation POINTER, and the interval between the position and thecurrent synchronization code, to carry out the decoding process.

However, if the number of bits indicated by the frame length informationPOINTER is greater than the number of bits from the last detectedsynchronization code to the current synchronization code, it is assumedthat the frame length information POINTER is erroneous, so that theaforementioned synchronization re-detecting process is not carried out.

If the numbers of bits of the frame length information POINTER and thecheck bit. CHKP are great, the synchronization code PSC, the framelength information POINTER, and the check bit CHKP may extend in aplurality of synchronization intervals as shown in FIG. 16. In thiscase, the bit inserting process in the coding system and the bitremoving process in the decoding system, which are performed in order tomaintain a constant humming distance between a code string other than asynchronization code and the synchronization code, may not be carriedout in an interval in which the frame length information POINTER and thecheck bit CHKP exist.

In the examples of FIGS. 15 and 16, in a case where the end half of asynchronization code PSC contains information representative of the kindof the synchronization code (the distinction between a framesynchronization code, a GOB synchronization code and so forth), theframe length information POINTER is not only protected, but the end halfof the synchronization code PSC may be also protected by an errorcorrecting code. Thus, since the kind of a synchronization code can beaccurately detected in addition to the position of the synchronizationcode, the resistance to errors can be further improved.

In the example of FIG. 17, a frame length information POINTER and acheck bit CHKP are arranged at the end of a frame (immediately before asynchronization code in the next frame). In this case, after thedecoding system detects the synchronization code in the next frame, ittakes out a frame length information POINTER and a check bit CHKPimmediately before the detected synchronization code to carry out theerror correction/detection decoding, to carry out the re-detection ofthe synchronization code by the same processes as those of FIGS. 15 and16.

In the example of FIG. 15, since the synchronization codes exist only atthe synchronization code inserting positions, the frame lengthinformation POINTER to be recorded may be a value derived by dividingthe number of bits of the frame by a synchronization code insertinginterval (=sync_period bits). Thus, the frame length can be indicated bya smaller number of bits.

In addition, in the first and second preferred embodiments, while therehas been shown examples of a hierarchical coding for changing an errorcorrecting/detecting code in accordance with the importance of the codedinformation, the same error correcting/detecting code may be used in theframe, or no error correcting/detecting code may be used. In such cases,it is possible to improve the capability to detect synchronization incomparison with conventional systems, by using the bit inserting processfor maintaining a code string other than a synchronization code at ahumming distance greater than a predetermined value from thesynchronization code, and the synchronization code detecting processcorresponding to the bit inserting process, as described in thispreferred embodiment.

In addition, in the aforementioned preferred embodiments, while it hasbeen shown that a dynamic image signal is high-efficiency compressionencoded to be transmitted/stored, the present invention may be appliedto the transmission/storage of a static image, voice, data or the like.For example, when the high-efficiency compression coding of a staticimage signal is carried out using the orthogonal transform, the errorcorrecting/detecting code may be switched so as to more strongly carryout the error protection of a low component of a transform coefficient.In the method for modeling and encoding voice into a driving source anda vocal tract filter, the error correcting/detecting code may beswitched so as to more strongly carry out the error protection of apitch cycle, a vocal tract parameter and so forth.

Third Preferred Embodiment

The third preferred embodiment of the present invention will bedescribed below. In this preferred embodiment, the errorcorrecting/detecting code is not used. At this point, this preferredembodiment is different from the first and second preferred embodiments.

FIG. 18 is a block diagram of a dynamic image coding system in thispreferred embodiment. Using the same reference numbers as those in FIG.1 for the parts corresponding to those in FIG. 1, the different pointsfrom the first preferred embodiment will be mainly described. In thispreferred embodiment, the construction and operation of an output codingunit 200 are different. In addition, although the basic operation of amultiplexer 111 is the same as the multiplexer 111 of FIG. 1, themultiplexer 111 in this preferred embodiment outputs only a multiplexedcode string 201 and a synchronization code insertion request signal 203since the error correcting/detecting code is not used.

FIG. 19 is a block diagram of the output coding unit 200 of FIG. 18. Theoutput coding unit 200 comprises a counter 1701 for counting the numberof bits of an output code string 205, a switch 1703 for switching theoutput code string 205, a switch controller 1704 for controlling theswitch 1703, and a stuffing bit generator 1705 for generating stuffingbits.

FIG. 20 shows an example of an output code string 205 generated by theoutput coding unit 200 of FIG. 19. The same signs as those in FIG. 4 areused for code words corresponding to those of the output code string ofFIG. 4. Similar to FIG. 4, each of synchronization codes PSC is insertedonly at any one of synchronization code inserting positions, which arearranged periodically, i.e., at regular intervals (sync_period bits) andwhich are indicated by arrows. FIG. 20 does not contain the check bitCHK for the error correcting/detecting code. At this point, FIG. 20 isdifferent from FIG. 4. A stuffing bit STUFF is inserted into the endpart of one frame of the output code string 205 so that asynchronization code PSC is inserted at the synchronization codeinserting position. The number of bits of the stuffing bit STUFF isequal to or less than sync_period.

The construction and operation of the output coding unit 200 of FIG. 19for producing such an output code string 205 will be described in detailbelow.

The counter 1701 is set to be “1” when a synchronization code insertionrequest signal 203 is inputted from a multiplexer 111 thereto and aninitial bit of a synchronization code 301 is inputted thereto as amultiplexed code string 201, and it is set to be a synchronization codelength sync_len when all the bits of the synchronization code 301 areinputted thereto. Thereafter, the counter 1701 counts up sequentiallyfrom the next bit of the synchronization code 301 until a bitimmediately before the next synchronization code is outputted.

When bits from the initial bit of the synchronization code to the bitbefore the next synchronization code are inputted as a multiplexed codestring 201, The switch controller 1704 controls the switch 1703 so as toswitch the switch 1703 to the multiplexed code string 201 to output themultiplexed code string 201 as an output code string 205.

Then, at the last part of one frame, the bit insertion (bit stuffing) iscarried out so that the next synchronization code is inserted at thesynchronization code inserting position. The multiplexer 111 output asynchronization code insertion request signal 203 for the next framewhen the output of the multiplexed code string 201 of one frame iscompleted. In response thereto, the switch controller 1704 switches theswitch 1703 to the stuffing bit generator 1705 to output a stuffing bit1223 as an output code string 205. The stuffing bit 1223 may have allthe bits of “1” or “0”, or a specific pattern such as “0101 . . . ”.

This preferred embodiment of a dynamic image decoding system, accordingto the present invention, will be described below.

FIG. 21 is a block diagram of a dynamic image decoding systemcorresponding to the dynamic image coding system of FIG. 18. Using thesame reference numbers as those in FIG. 8 for parts corresponding tothose in FIG. 8, the different points from the first preferredembodiment will be mainly described. In this preferred embodiment, theconstruction and operation of an input coding system 800 are differentfrom those in the first preferred embodiment. In addition, signalsinputted from the input decoding unit 800 to a demultiplexer 811 areonly a code string 801 and a synchronization code detection signal 803,and no signal is inputted from the demultiplexer 811 to the inputdecoding unit 800.

FIG. 22 is a block diagram of the input decoding unit 800. The inputdecoding unit 800 comprises a synchronization detector 1901 fordetecting a synchronization code in an input code string 205′, and acounter 1902 for counting the number of bits of the input code string205′.

The counter 1902 is reset to be “0” at the initial stage of decoding,and counts up a counted value 1911 for each “1” every time one bit ofthe input code string 205′ is inputted.

The synchronization detector 1901 detects synchronization codes only atthe synchronization code inserting positions on the basis of the countedvalue 1991 of the counter 1902. For example, assuming that thesynchroni-zation code inserting interval is sync_period, the countedvalue 1911 is bit_count, and the length of the synchronization code issync_len, the synchronization detection is carried out only when0<bit_count mod sync_period≦sync_len, wherein A mod B denotes aremainder when A is divided by B. The synchronization detector 1901outputs a synchronization; code detection signal 803 when asynchroni-zation code is detected.

The code string 801 from the input decoding unit is inputted to themultiplexer 811 while the input code string 205′ is outputted as it is.Thereafter, similar to the dynamic image decoding system of FIG. 21, thedemultiplexing and decoding processes are carried out.

In a case where the last stuffing bit STUFF of the frame is apredetermined bit pattern, it is determined whether the stuffing bitSTUFF corresponds to a predetermined pattern in the demultiplexer 811.When it does not correspond thereto, it is determined that there is anerror in the input code string 205′, so that the process for preventingthe picture quality from being greatly deteriorated, which has beendescribed with respect to the dynamic image coding system in the firstpreferred embodiment, may be carried out.

Fourth Preferred Embodiment

The fourth preferred embodiment of the present invention will bedescribed below.

In this preferred embodiment, the whole construction of a dynamic imagecoding system is the same as that of the dynamic image coding system ofFIG. 18, and the operation of an output coding unit is different fromthat in the third preferred embodiment.

FIG. 23 is a block diagram of an output coding unit 200 in FIG. 18.Using the same reference numbers for parts corresponding to those of theoutput coding unit of FIG. 19, the difference from the output codingunit of FIG. 19 is that a bit inserting unit 1211 for carrying out thebit stuffing process for preventing a pseudo synchronization code isadded.

In the bit inserting unit 1211, the bit insertion for preventing apseudo synchronization for occurring is carried out for the multiplexedcode string 201. Since it is not possible to uniformly decode asynchronization code if the same bit pattern as the synchronization codeis contained in the output code string 205, the bit insertion is carriedout in order to prevent this. For example, as shown in FIG. 5, when thesynchronization code comprises “0”s of sync_(—)0_len bits, a “1” of onebit and “xxxxx” of sync_nb_len bits representative of the kind of thesynchronization code, it is possible to prevent a pseudo synchronizationfrom occurring if a “1” is inserted so that “0”s of sync_(—)0_len bitsor more are not continuously arranged in the code string other than thesynchronization code.

The synchronization code is inserted only into the synchronization codeinserting system. Therefore, the bit inserting operation for preventingthe pseudo synchronization from occurring may be carried out only at thesynchronization code inserting positions. Thus, it is determined whetherit is required to carry out the bit insertion on the basis of a countedvalue 1221 representative of the total number of bits of an output codestring 205. Assuming that the counted value 1221 is total_len, thenumber of “1”s in the multiplexed code string 201 is counted in aninterval of 0<total_len_mod_sync_period≦sync_(—)0_len. If no “1” existsin this interval, a “1” of one bit is inserted. Herein, A mod B denotesa remainder when A is divided by B.

In addition, in order to decrease the probability of the error detectionof a synchronization code due to error, the bit insertion may be carriedout as follows.

In order to detect a synchronization codes even if an error of n bits ismixed into the synchronization code, it is required to determine that acode word having a hamming distance of n or less from a truesynchronization code in an input decoding unit of a dynamic imagedecoding system as described later is a synchronization code. However,if such a determination is carried out while the code strings other thanthe synchronization code areas they are, bit patterns having a hammingdistance of n or less from the synchronization code may exist even inthe code strings other than the synchronization code. If this isarranged at the synchronization code inserting position, it may beerroneously determined to be the synchronization code.

Therefore, the following bit insertion into a multiplexed code string201 is carried out by means of a bit inserting unit 211, so that thecode strings other than the synchronization codes arranged at thesynchronization code inserting positions in the multiplexed code string201 are transformed so as to have a humming distance of 2×n+1 or morefrom the synchronization code. Specifically, the number of “1”s (assumedto be n0) is counted in an interval in which 0<total_len modsync_period≦sync_(—)0_len−(2×N+1). If n0 is less than 2×n+1, “1”s of2×n+1−n0 bits are inserted into the multiplexed code string 201.

With respect to a code string 1222, in which the bit insertion has beenthus carried out, the bit insertion (STUFF in FIG. 20) is carried out inthe last interval of the frame similar to the output coding unit of FIG.19, to be outputted as an output code string 205.

This preferred embodiment of a dynamic image decoding system, accordingto the present invention, will be described below. The wholeconstruction of this dynamic image decoding system is the same as thatof the dynamic image decoding system of FIG. 21, and the operation of aninput coding system 800 thereof is different from that in the thirdpreferred embodiment.

FIG. 24 is a block diagram of an input decoding unit 800. Using the samereference numbers for parts corres-ponding to those of an input decodingunit of FIG. 22, the difference between this preferred embodiment andthe third preferred embodiment will be mainly described. In thispreferred embodiment, a bit removing unit 1905 is added.

An input code string 205′ is inputted to an inserted bit remover 1905,and a process for removing inserted bits is carried out in order toprevent a pseudo synchronization code inserted by a bit inserting unit1211 of the output coding unit of FIG. 23. As described above, since thebit insertion is carried out only at the synchronization code insertingpositions, the synchronization code inserting positions are determinedon the basis of a counted value 1911 of a counter 1902.

For example, assuming that the synchronization code is a code word shownin FIG. 5 and when the bit inserting unit 1211 carries out the bitinsertion into the initial portion “0000 . . . ” of the synchronizationcode so that the humming distance from the synchronization code isgreater than 2×n+1, the number of “1”s of sync_(—)0_len−(2×n+1) bitsfrom the synchronization code inserting position is counted. When the n0is less than 2×n+1, 2×n+1−n0 bits are removed.

Since it is determined that the inserted bit is “1”, when the bitdetermined to be the inserted bit is “0”, it is considered that an erroris mixed in the synchronization code inserting interval. In this case,an error detection signal (not shown) may be outputted to ademultiplexer 811, and the same process as that in the first preferredembodiment may be carried out so as to prevent a reproduced image frombeing greatly deteriorated.

The bit inserting process by the bit inserting unit 1211 of FIG. 23 maybe carried out so that the inserted bits of a predetermined number ofbits are inserted into all the synchronization code inserting intervalsother than the synchronization code. FIG. 25 shows an example of anoutput code string 205 when such a bit inserting process is carried out.In the drawing, SB denotes an inserted bit.

For example, as shown in FIG. 5, when a synchronization code comprises“0”s of sync_(—)0_len bits, a “1” of one bit and “xxxxx” of sync_nb_lenbits representative of the kind of the synchronization code, an insertedbit SB of one bit is inserted at a predetermined position of an intervalof sync_(—)0_len bits from the head of the synchronization codeinserting interval.

The inserted bit SB may be always “1”. In addition, in accordance with abit pattern in an interval of sync_(—)0_len bits from the head of thesynchronization code inserting interval, the inserted bit SB may besuitably determined so that the number of “1”s in the interval is equalto or greater than 1.

Moreover, the inserted bit SB may be an odd parity in an interval ofsync_(—)0_len bits from the head of the synchronization code insertinginterval, to prevent the same bit pattern as the synchronization codefrom occurring and to detect an error mixed into this bit pattern.

FIG. 25(b) shows an example of an output code string, in which such abit inserting process is carried out. In this example, an inserted bitSB of 1 bit is inserted into the initial portion from thesynchronization code inserting position. This inserted bit SB isdetermined so that the number of “1”s in an interval of the inserted bitSB and sync_(—)0_len−1 bits from the next bit is always an odd number.For example, in the left example of FIG. 25(b), the inserted bit SB is“1”. In addition, in the right example of FIG. 25(b), since the insertedbit SB is “1” even if all the bits are “0” in the interval ofsync_(—)0_len−1 bits from the next bit to the inserted bit SB, “1”s of 1bit or more always exist in the synchronization code inserting interval,so that the same bit pattern as the synchronization code is notproduced. In addition, since the inserted bit SB serves as a paritycheck, it is possible to detect a bit error mixed into this interval.

In addition, the inserted bit SB may be an odd parity check bit for allthe bits before the next synchronization code inserting position.However, in order to prevent the same bit pattern as the synchronizationcode from occurring only when all of sync_(—)0_len−1 bits from the nextbit to the inserted bit SB are “0”, the inserted bit SB is always set tobe “1”. Thus, it is possible to carry out the error detection by theparity check of all bits.

In order to decrease the probability of the error detection of asynchronization code due to error, it is desired to insert more bits.For example, in order to correctly detect synchronization even if anerror of n bits is mixed, “1”s of 2×n+1 bits are inserted into apredetermined position in this interval.

In this preferred embodiment, the operation of the bit removing unit1905 of FIG. 24 is different so as to correspond to the operation of theaforementioned bit inserting unit 1211. That is, the bit removing unit1905 removes the inserted bit SB at a predetermined position, at whichthe bit insertion has been carried out by the bit inserting unit 1211.

In a case where the inserted bit SB is always “1”, it is determined thata bit error exists when a bit at the bit inserting position in the inputcode string 205′ is “0”, so that an error detection signal (not shown)may be outputted to the inverse multiplexer 811 so as to prevent areproduced image from being greatly deteriorated.

In the first through fourth preferred embodiments, while the predictionmode information 303, the motion vector information 304 and the residualDCT coefficient 305 have been multiplexed in the multiplexer 111 foreach coding frame as shown in FIG. 2, the predication mode information303, the motion vector information 304 and the residual DCT coefficient305 may be multiplexed for each coding region (e.g., a macro block, GOB)as shown in FIG. 26. In this case, the picture header 302 and the otherinformation may have different error correcting/detecting code, or thesame error correcting/detecting code. Alternatively, an errorcorrecting/detecting code may be used for only the picture header or fora part of a code string of a predetermined number of bits of each frame,or no error correcting/detecting code may be used.

In addition, the multiplexing may not be carried out only for each frame(picture), but it may be also carried out for each part of a frame orfor each layer of a plurality of frames, so that a synchronization codemay be inserted for each of these multiplexing units (layer unit).

FIG. 28 shows examples of such multiplexing. In the examples of FIG. 28,the multiplexing processes are carried out for each of four layers,i.e., each macro block layer of a plurality of coding blocks, each GOBlayer of a plurality of macro blocks, each picture (frame) layer, andeach session layer of a plurality of pictures. Among these layers, thesession, picture and GOB layers use their synchronization signals (SSC,SEC, PSC and GSC in the drawing), respectively. Different codes are usedfor the SSC, SEC, PSC and GSC so that it is possible to identify whichlayer the synchronization code is detected. When the synchronizationcode shown in FIG. 5 is used, these synchronization codes may bedistinguished by the portion of sync_nb_len bits representative of thekind of the synchronization code.

Also when such multiplexing is carried out, the same processes as thosefor the frame synchronization code in the preceding preferredembodiments may be carried out for a part or all of the synchronizationcodes of the session, picture or GOB. FIG. 29 shows an example of anoutput code string, in which such a process is carried out. As shown inFIG. 29, stuffing bits STUFF are inserted before the PSC and the GSC,and the SSC, PSC and GSC are inserted at the synchronization codeinserting positions indicated by arrows in the drawing. Therefore,similar to the afore-mentioned preferred embodiment which shows theframe synchronization code PSC, the detection accuracy of eachsynchronization code can be improved.

The same length information as the frame length information POINTER ofFIGS. 15, 16 and 17 may be added to each synchronization code of thesession, picture and GOB. In a case where the frame length informationPOINTER is protected by the error correcting/detecting code as shown inFIGS. 15 and 16, if the error correcting/detecting code is not used onlyfor the frame length information POINTER, but it is also used for aportion of sync_nb_len bits representative of the kind of asynchronization code, it is possible to improve the probability that,the kind of the synchronization code, in addition to the positionthereof, can be correctly detected. In addition, a part or all of theheader information (SH, PH and GF in the drawing) of the session,picture and GOB may be protected using the error correcting/detectingcode, so that it is possible to improve the error resistance of eachheader information.

In a case where the stuffing process for preventing a pseudosynchronization code is carried out as this preferred embodiment, thefollowing process may be carried out so that the synchronization codeinserting interval sync_period is equal to or less than the length ofthe synchronization code.

First, the process in the output coding unit of the dynamic image codingsystem will be described. It is assumed herein that the synchronizationcode is a code word comprising “0”s of sync_(—)0_len bits and a “1” of 1bit as shown in FIG. 5. In the output coding unit of FIG. 23, assumingthat the counted value 1221 representative of the number of bitsoutputted from the bit inserting unit 1211 is total_len, when aremainder of division of total_len by the synchronization code insertinginterval sync_period is equal to a remainder of division of a value,which is derived by subtracting 1 from the number of bits sync_(—)0_lenof the initial “0” of the synchronization code, by sync_period, i.e.,when

total_len mod sync_period=(sync_(—)0_len−1)mod sync_period  (1)

the number of “1”s (assumed to be n1) in the output bits before(sync_(—)0_len−1) bits from the output bit at that time is counted, anda “1” of 1 bit is inserted if no “1” exists (i.e., if n1=0).

FIG. 33(a) shows an example of an output code string, for which such aprocess has been carried out. In the drawing, each of downward arrowsindicates a synchronization code inserting position, and asynchronization code comprises “0”s of 23 bits (i.e., sync_(—)0_len=23),and a “1” of 1 bit. In the shown example, a synchronization codeinserting interval sync_period is 8, which is shorter than the length ofthe synchronization code (=24 bits).

In the drawing, intervals 1 through 4 denote intervals for counting theaforementioned n1. In each interval, the number of “1”s n1 issequentially counted. If n1=0, a stuffing bit is inserted into the nextbit of the interval. Since n1>0 in interval 1, it is not required toinsert the stuffing bit. Since n1=0 in interval 2, a stuffing bit 3301of 1 bit is inserted into the next interval. In interval 3, n1=1 due tothe inserted stuffing bit 3301, so that it is not required to insert astuffing bit.

If such a bit stuffing process is carried out, the same bit pattern as asynchronization code does not exist at a portion other than thesynchronization code in an output code string, so that no pseudosynchronization occurs.

On the other hand, in order to decrease the probability that asynchronization code is erroneously detected due to transmission lineerror, a bit insertion may be carried out as follows.

Even if an error of n bits enters a synchronization code, thesynchronization code can be correctly detected by carrying out a bitinserting process so that a humming distance between a portion otherthan the synchronization code and the synchronization code in an outputcode string in a bit insertion 1211 is equal to or greater than 2×n+1.

In this process, when a remainder derived by dividing a counted value1221 total_len representative of the total number of bits of the outputcode string 205 of FIG. 23 by a synchronization code inserting intervalsync_period is coincident with a remainder derived by dividing a value,which is derived by subtracting 2×n+1 from the initial number of bits of“0”s of a synchronization code, by sync_period, i.e., when

total_len mod sync_period=(sync_(—)0_len−(2×n+1))mod sync_period  (2)

the number of “1”s (assumed to be n1) in output bits of(sync_(—)0_len−(2×n+1)) bits from the output bit at that time. If thenumber of “1”s is less than (2×n+1) bits, i.e., if n1<2×n+1, “1”s of(2×n+1−n1) bits are inserted.

As shown in FIG. 5, when a synchronization code starting from “0”s of aplurality of bits is used, if the number of “1”s in a bit stringimmediately before the synchronization code is insufficient, asynchronization error detection may occur at that portion. In order toprevent this, a bit insertion (STUFF in FIG. 20) in the last interval ofa frame may be outputted so that the number of bits of “1”s in aninterval of sync_period bits from the synchronization code to thesynchronization code inserting position immediately before thesynchronization code is equal to or greater than 2×n+1 bits.

In order to do this, a STUFF always containing “1”s of 2×n+1 bits may beused, or the STUFF may be determined in accordance with an output codestring. That is, the STUFF may be determined so that the number of bitsof “1”s of sync_period bits immediately before the synchronization codein the output code string containing the STUFF is equal to or greaterthan 2×n+1 bits.

FIG. 33(b) shows an example of an output code string, for which such aprocess has been carried out. In the drawing, intervals 1 through 4denote intervals for counting the aforementioned n1. In each interval,the number of “1”s n1 is sequentially counted. If n1<2×n+1, a stuffingbit is inserted into the next bit of that interval. Since n1=1 ininterval 2, stuffing bits 3311 of (2×n+1)−1=2 bits are inserted into thenext interval. In interval 3, n1=3 due to the inserted stuffing bits3311, so that it is not required to insert stuffing bits.

Moreover, in order to prevent a synchronization code error detectionimmediately before a synchronization code, a STUFF is determined asfollows. It is assumed that a bit immediately before the STUFF is 3311.Since the number of “1”s in an interval (interval 5) of sync_period bitsfrom a synchronization code inserting position immediately before thebit 3312 to a synchronization code inserting position immediately afterthe bit 3312 is only 1 bit, an synchronization error detection may occurin this portion if the synchronization code has a plurality of “0”continuously arranged as shown in FIG. 5. Therefore, the position, atwhich the synchronization code is inserted, is shifted to the nextsynchronization code inserting position, and a STUFF 3313 containingmany “1”s is outputted. Thus, since “1”s of 2×n+1 or more are containedin an interval (interval 6) of sync_period bits immediately before thesynchronization code, it is possible to prevent the synchronizationerror detection.

If such a bit stuffing process is carried out, the humming distance fromthe synchronization code can be 2×n+1 or more at a portion other thanthe synchronization code in the output code string, so that theprobability of the synchronization error detection can be decreased.

Processes in an output decoding system of a dynamic image decodingsystem will be described below. In the bit remover 1905 of FIG. 24,assuming that the counted value 1905 representative of the number ofbits of an input code string is total_len, and when the total_len meetsthe conditions in which it is 1, the number of “1”s (assumed to be n1)in input bits of (sync_(—)0_len−1) bits from the input bit at that timeis counted. If no “1” exists, i.e., if n1=0, 1 bit is removed.

In order to detect a synchronization code even if an error of n bits ismixed into the synchronization code, in a case where a bit insertingprocess is carried out by the bit inserting unit 1211 so that thehumming distance between a portion other than the synchronization codeand the synchronization code in an output code string is equal to orgreater than 2×n+1, the following process may be carried out. When thetotal_len reaches a value meeting formula (2), the number of “1”s(assumed to be n1) of (sync_(—)0_len−(2×n+1)) bits from the input bit atthat time in the output bits is counted. When the number of “1”s is lessthan (2×n+1), i.e., when n1<(2×n+1), (2×n+1−n1) bits are removed.

In the output coding unit and the input decoding unit, if theaforementioned processes are carried out so that the synchronizationcode inserting interval sync_period has a smaller number of bits thanthe length of the synchronization code, the number of bits of thestuffing bits STUFF can be decreased, so that the coding efficiency canbe improved. In particular, when a synchronization code is long, or whenmany synchronization codes are inserted, the degree of the enhancedcoding efficiency due to the decrease of the number of bits of thestuffing bits STUFF is great. For example, in a system for dividing ascreen into one or a plurality of macro blocks or macro block lines toinsert synchronization codes into each unit, such as a GOB/slice in adynamic image coding, many dynamic image patterns are inserted, so thatthe degree of the coding efficiency due to the decrease of the number ofbits of the STUFF is increased.

In addition, when a structure having a plurality of layers ismultiplexed as shown in FIG. 28, synchronization codes having differentlengths in accordance with layers may be used.

FIG. 34(a) shows examples of such synchronization codes. Among fourkinds of synchronization codes, each of SSC, SEC and PSC has 32 bits,which comprises “0”s of 23 bits, a “1” of 1 bit and 8 bitsrepresentative of the kind of the synchronization code. On the otherhand, a synchronization code GSC of a GOB layer is a synchronizationcode of 17 bits, which comprises “0”s of 16 bits and a “1” of 1 bit, andis a shorter code word than other synchronization codes.

The reason why only the GSC is such a shorter code word is as follows.The GOB is a coded unit, which comprises one or a plurality of macroblocks (MB) and which is formed by dividing a screen into small regions,so that there are generally more synchronization codes of the GOB layerthan other synchronization codes. Therefore, if the synchronization codelength is decreased, the code amount of the output code string can bedecreased. In addition, it is possible to output more GSCs if the codeamount is the same, and it is possible to divide the screen into smallGOB regions for encoding, so that the quality of a reproduced image canbe improved when a transmission line error occurs.

A process for preventing a pseudo synchronization as described in thefourth preferred embodiment, i.e., a bit stuffing process for preventingthe same bit pattern as a synchronization code from being produced in acode string other than the synchronization code, may be carried out. Ifa bit stuffing process for decreasing the probability of error detectionof a synchronization code due to a transmission line error, e.g., a bitstuffing process for preventing the same bit pattern as a shortestsynchronization code (GSC in the example of FIG. 34(a)) from beingproduced in a bit string, for which it is ensured only that the same bitpattern as a long bit length of synchronization code (SSC, SEC, PSC inthe example of FIG. 34(a)) is not produced, is carried out, it ispossible to prevent the same bit patterns as all the synchronizationcodes from being produced. This process may be carried out for the codestrings of all the layers, or for code strings of lower layers (GOBlayer, macro block layer in the shown example) than a layer using theshortest code, or for code strings of layers (picture layer, GOB layer,macro block layer) below a layer immediately above that layer.Alternatively, this process may be carried out only for code strings ofa predetermined layer.

In order to easily identify synchronization codes of different lengthseven if a transmission line error occurs, the process of asynchronization code or before and after the synchronization code may becarried out as follows.

(i) In a case where a synchronization code comprising a plurality ofbits of “0”s and the subsequent “1” is used, the relative positions of along code word and a short code word from the synchronization codeinserting position of the “1” may be different. In the example of FIG.34(b), the “1” 3211 of the PSC and the “1” 3412 of the GSC are arrangedat different position, and all of bits (3413 to 3411, 3414 to 3412)arranged at the same positions in other synchronization codes are “0”.Thus, since the humming distance of the synchronization code and apartial code string thereof is increased, it is possible to easilyidentify different synchronization codes even if a transmission lineerror occurs.

(ii) A stuffing bit may be inserted before a short synchronization code.For example, if a stuffing bit 3401 comprising one or a plurality of“1”s is inserted before a short GSC, the humming distance between theOSC and a partial code string of another synchronization code can beincreased.

(iii) A stuffing bit may be inserted after a short synchronization code.For example, a bit insertion 3402 may be carried out after a GSC so asto increase the humming distance from a portion identifying the kind ofa synchronization code in long synchronization codes.

Fifth Preferred Embodiment

The fifth preferred embodiment of the present invention will bedescribed below.

In this preferred embodiment, the whole constructions of a dynamic imagecoding system and a dynamic image decoding system are the same as thosein the first preferred embodiment, except for the processes carried outat the head and end portions of a synchronization interval by an outputcoding unit 200 and an input decoding unit 800.

FIGS. 27(a), 27(b) and 27(c) are examples of an output code string 205of a dynamic image coding system in this preferred embodiment. In thisoutput code string 205, a part 2701 of a code string of the last frame(frame n−1) is arranged after a synchronization code PSC, and a pointerinformation 2702 (SA) representative of a boundary 2703 (a start pointof a code string of the current frame) between the code string 2701 andthe current frame (n frame), i.e., the boundary between multiplexed codestrings, is arranged, so that the stuffing bit (STUFF in FIG. 4) doesnot exist at the last of one frame. At this point, this output codestring 205 is different from the output code string of FIG. 4.

In the output coding unit 200 of the dynamic image coding system, thenumber of bits resid_bit of the residual code strings of the frame ischecked at each synchronization code inserting position. When the sum ofthe resid_bit and the numbers of bits of a synchronization code PSC anda pointer information SA is less than synchronization code insertinginterval sync_period bits, the synchronization code PSC is outputtedbefore the residual code strings of the frame are outputted to theoutput code string 205. Then, the pointer information SA (representativeof the resid_bit in this case) is outputted, and then, the residual codestrings 2701 are outputted. Thereafter, the code strings of the nextframe are outputted.

In the input coding system 800 of the dynamic image decoding system, asynchronization codes is detected at each of synchronization codeinserting positions. When the synchronization code is detected, it isdetermined that the pointer information SA and the residual informationof the frame are arranged after the detected synchronization code, andthe subsequent process is carried out.

For example, the boundary between a frame n−1 and a frame n in FIG. 27will be described. After the decoding process immediately before 2704the synchronization code PSC is completed, a synchronization code isdetected in the subsequent synchronization code inserting interval. Whenthe synchronization code is detected, the pointer information 2702 isdecoded, and it is derived which bits the code strings of the frame n−1have. On the basis of this, the bits of the number of bits indicated bythe pointer information are taken out of the code string immediatelyafter the pointer information (to 2703 in FIG. 27), and the code string801 is outputted so that these are arranged after 2704.

In this preferred embodiment, the error correction/detection coding of apart or all of the output code strings may be carried out as shown inFIG. 27(a). In this case, all the kinds of the errorcorrecting/detecting codes may be the same or different.

In addition, as shown in FIG. 27(b), the error correction/detectioncoding may not be carried out.

Moreover, as shown in FIG. 27(c), the frame length information POINTERrepresentative of the number of bits of code strings of one frame asshown in FIGS. 15 and 16 may be inserted. In this case, the frame lengthinformation POINTER may be representative of the number of bits from thesynchronization code PSC of the frame to a synchroniza-tion code PSC ofthe next frame.

In a case where the error correction/detection coding is carried out asshown in FIG. 27(a), the pointer information SA, the residual codestrings 2701 of the frame n−1, and the code strings of the frame n after2703 are combined to be one information bit, and the errorcorrection/detection coding of the combined information bit is carriedout.

The pointer information SA may be information, for which the errorcorrection/detection coding has been carried out. In this case, thesynchronization code PSC (or a part thereof), the frame lengthinformation POINTER and the pointer information may be combined to carryout the error correction/detection coding.

Examples of stuffing bits STUFF will be described below.

FIGS. 30(a) and 30(b) shows examples of code tables of stuffing bitsSTUFF as examples of the aforementioned stuffing bits STUFF. Both ofFIGS. 30(a) and 30(b) are characterized in that the decoding can beuniformly carried out in the backward direction to an output codestring, so that the starting position of the stuffing bits STUFF can beuniformly identified. Therefore, an error mixed into a code string canbe detected by comparing the decoding end position of a code stringimmediately before the stuffing bit STUFF with the starting position ofthe stuffing bit STUFF, and the starting point of the backward decodingcan be identified when a coding system for decoding in a backwarddirection from a synchronization code is used.

Moreover, in the stuffing bits STUFF shown in the code tables of FIGS.30(a) and 30(b), the first bit is always “0”, so that the errordetection can be carried out by a simplified decoding as describedlater.

FIG. 31 shows an example of a decoding process of a code string, whichcontains the stuffing bits STUFF shown in the code tables of FIGS. 30(a)and 30(b). Although FIG. 31 shows an example of the stuffing bitimmediately before the synchronization code inserting position, the sameprocess can be carried out by inserting a stuffing bit immediatelybefore another optional synchronization code inserting position. In FIG.31, arrows 3101 through 3103 denote examples of decoding end positionsof a code string (indicated by “xxx . . . ”) immediately before thestuffing bit STUFF when the decoding is carried out in a forwarddirection, and the right end of each of the arrows indicates thedecoding end position. When no error is mixed into a code string and thedecoding is normally carried out, the decoding end position of a codestring immediately before the stuffing bit STUFF is coincident with thestarting position of the stuffing bit STUFF as shown by the arrow 3101.

On the other hand, when an error is mixed into a code string, thedecoding end position of a code string immediately before the stuffingbit STUFF is shifted from the starting position of the stuffing bitSTUFF as shown by the arrows 3102 and 3103. In such a case, it isdetermined that an error exists in the code string.

In the decoding system, when the decoding of a code string immediatelybefore the stuffing bit STUFF is completed, the stuffing bit STUFFbefore the next synchronization code inserting position is read, and itis determined whether the read stuffing bit STUFF is coincident with thecodes in the code table shown in FIGS. 30(a) and 30(b). If the stuffingbit STUFF is not coincident with any codes, it is determined that anerror exist.

When it is determined whether the stuffing bit STUFF is coincident withthe code table, a small bit error may be allowable. Thus, it is possibleto decrease the error detection of an error when an error is mixed intothe stuffing bit STUFF itself.

The code table of FIG. 30(a) always starts from “0” and has thesubsequent bits of “1”s. Therefore, in order to carry out the errordetection, it may be determined only whether the next bit to thedecoding end position of the code string immediately before the stuffingbit STUFF is “0”, or the error detection may be carried out only by thefirst “0” and the subsequent some “1”s. Thus, although the errordetection accuracy is slightly lowered, the throughput required todecoding can be decreased. Thus, in a case where a code table startingfrom a specific bit pattern, in which all the stuffing bits STUFFcomprise a specific bit or a plurality of bits, is used, the decodingprocess can be simplified.

Moreover, the stuffing bits STUFF shown in the code tables of FIGS.30(a) and 30(b) contain a lot of bits of “1”, and the humming distancesfrom the synchronization code containing a lot of “0”s and a partthereof are great as shown in FIG. 5, so that there is an advantage inthat the probability that a pseudo synchronization occurs is low.Specifically, in the code table of FIG. 30(a), all of only the firstbits of the stuffing bits STUFF are “0”, and all of the other bits are“0”, so that the humming distance between the synchronization codes, allof which are “0”, and a part thereof is (the length of the stuffing bitSTUFF is −1). In addition, in the code table of FIG. 30(b), only thefirst and last bits of the stuffing bits STUFF are “0”, and all theother bits are “1”, so that the humming distances from thesynchronization code and a part thereof are (the length of the stuffingbit STUFF is −2).

Thus, if the humming distances between the stuffing bit STUFF, and thesynchronization code and a part thereof are selected so as to be greaterthan a predetermined value, e.g., (the length of the stuffing bit STUFF−2), so that it is difficult to produce a pseudo synchronization codeeven if an error is mixed into a code string.

Referring to FIG. 32, this effect will be described. FIGS. 32(a-0) and32(b-0) show examples of code strings when usual stuffing bits (all thebits are “0”) and the stuffing bits STUFF shown in the code table ofFIG. 30(a) are used, and FIGS. 32(a-1) and 32(b-1) show examples when anerror of 1 bit is mixed in FIGS. 32(a-0) and 32(b-0), respectively. Ascan be seen from FIG. 32(a-1), if only an error of 1 bit is mixed intothe usual stuffing bits wherein all the bits are “0”, the same bitpattern as the synchronization code is produced as shown by the brokenline in FIG. 32(a-1), so that a pseudo synchronization occurs. On theother hand, the stuffing bit STUFF representative of the code table ofFIG. 30(b) is not the same pattern as the synchronization code even ifan error is mixed as shown in FIG. 32(b-2), so that no pseudosynchronization occurs.

Thus, the stuffing bit in this preferred embodiment has advantages inthat it is possible to easily detect an error of a code string, and itis difficult to produce a pseudo synchronization code even if an erroris mixed into a code string, so that it is possible to provide a strongerror resistance.

In addition, the stuffing bit in this preferred embodiment can uniformlydecode in the backward direction, and identify the starting positionthereof, i.e., the end position of a code string immediately before thestuffing bit STUFF. Therefore, after the coding, by which an informationcode string can decoded in both of forward and backward directions, iscarried out, the code string immediately before the STUFF can be decodedin the backward direction as shown by the arrow 3104 in FIG. 31.

In the aforementioned preferred embodiment, the stuffing bit STUFF maybe determined as follows.

(1) In a case where a synchronization code contains “0”s ofsync_(—)0_len bits as shown in FIG. 5, if all the bits of the stuffingbits STUFF or at least at the synchronization code inserting positionsare set to be “1”, the humming distances between the portions of “0” ofthe synchronization code and the stuffing bits STUFF can be increased.Therefore, it is possible to decrease the probability that an error ismixed into the stuffing bits STUFF to produce a pseudo synchronization.

(2) The stuffing bit STUFF may be a code word representative of thelength thereof. In the decoding system, the length of the STUFF from thepoint, at which the decoding of a code string other than the stuffingbit STUFF is completed, is determined, and the decoding of the STUFF isdecoded to decode the length information of the STUFF. In this case, ifboth are coincident with each other, it can be determined that an erroris mixed into the code string.

In addition, the length of the code string of the stuffing bits STUFFmay be indicated by binary numbers. For example, if the STUFFs are 5bits, “5” may be indicated by binary numbers so as to be “00101”.Alternatively, a value derived by taking a complement of “1” or “2” froma value indicated by binary numbers may be used as a code word of thestuffing bits STUFF. Thus, the number of bits of “0”s in the STUFFs isdecreased, so that it is possible to inhibit a pseudo synchronizationfrom occurring similar to the aforementioned (1).

(3) In a case where the coding is carried out using a code word whichcan be decoded in both of forward and backward directions, it isrequired to decode the stuffing bits STUFFs in the backward directionfrom the end point of the frame in the decoding system, to find thestarting point (the boundary point between the STUFF and another codeword). In such a case, the STUFFs may be determined so as to be a codeword, which starts from “0”(s) of 1 bit or a plurality of bits and hasthe residuals of “1”s, such as “01111111” . Thus, if the STUFFs aredecoded in the backward direction to seek the position of “0”, it can beuniformly determined that the sought position is the starting point ofthe STUFFs. In addition, in this example, the bits other than theinitial portion of the stuffing bits STUFFs are “1”, so that it ispossible to decrease the probability that a pseudo synchronizationoccurs similar to the aforementioned (1).

(4) The stuffing bit STUFF may be a check bit, a parity check bit or thelike for an error correcting/detecting code of a part or all of bits ofan output code string. Thus, the error correction/detection of a biterror mixed into an output code string can be carried out.

As described in the above examples, stuffing bits STUFFs are produced inaccordance with a predetermined rule, and the stuffing bits STUFFs in aninput code string are checked with the producing rule in a decodingsystem. If it is determined that the stuffing bits STUFFs are againstthe producing rule, it can be, determined that an error is mixed intothe input code string. Thus, if a process for preventing a reproducedimage from being greatly deteriorated is carried out in a dynamic imagedecoding system, it is possible to improve the quality of a reproducedimage when an error is mixed into the input code string.

Moreover, in the aforementioned preferred embodiment, thesynchronization code inserting interval sync_period may be determined asfollows.

(1) In a case where an error correcting/detecting code is used, asynchronization code inserting interval sync_period may be greater thanthe minimum number of bits required to carry out the synchronizationdetection by means of a decoding system, i.e., the sum of the length ofa synchronization code and the maximum value of a check bit for an errorcorrecting/detecting code. Since the mean value of the numbers of bitsof the last stuffing bits STUFFs of a frame is sync_period/2, if thesync_period has the minimum bits, by which the synchronization detectioncan be carried out, it is possible to decrease the number of bits of thestuffing bits STUFFs to improve the coding efficiency.

(2) In a case where no error correcting/detecting code is used, asynchronization code inserting interval sync_period may be greater thanthe minimum number of bits required to carry out the synchronizationdetection by means of a decoding system, i.e., the length of asynchronization code. Since the mean value of the numbers of bits of thelast stuffing bits STUFFs of a frame is sync_period/2, if thesync_period has the minimum bits, by which the synchronization detectioncan be carried out, it is possible to decrease the number of bits of thestuffing bits STUFFs to improve the coding efficiency.

(3) In a case where a frame length information POINTER is used as shownin FIGS. 15, 16, 17 and 27, a synchronization code inserting intervalsync_period may be shorter than the length of a synchronization code.Thus, it is possible to decrease the number of bits of the stuffing bitsSTUFFs to improve the coding efficiency.

(4) In a case where the transmission/storage is carried out by dividinginto packets or cells at intervals determined in a transmission line ora storage medium, a synchronization code inserting interval sync_periodmay be matched with the interval of the packets or cells, or a divisorthereof. Thus, since the head of the packets or cells is always arrangedat the synchronization code inserting position, it is possible to detecta synchronization code even if a packet or cell is produced due topacket loss or cell loss.

(5) The synchronization code inserting interval sync_period ispreferably shorter than the required minimum number of bits of a frame.Thus, it is possible to decrease the number of bits of the stuffing bitsSTUFFs to improve the coding efficiency.

Sixth Preferred Embodiment

The sixth preferred embodiment of the present invention will bedescribed.

FIG. 35 shows examples of output code strings of a dynamic image codingsystem in this preferred embodiment. In these output code strings, inorder to decrease the probability of the error detection of asynchronization code due to errors, the bit inserting process asdescribed in the aforementioned preferred embodiments is carried out. Inaddition, information, such as heater information, is arranged atpredetermined positions, or at predetermined positions based on asynchronization code.

FIG. 35(a) is a code-string before a bit inserting process is carriedout, and FIG. 35(b) is a code string after a bit inserting process iscarried out. In the drawings, each of the portions 3201, 3202, 3261 and3262 shown by the slanting lines shows information arranged at thepredetermined position (the predetermined position based on asynchronization code), and each of void arrows 3211 and 3212 indicatesthe position, into which the information is inserted. The information3261 and information 3262 of the code string in FIG. 35(b) correspondsto the information 3201 and information 3202 of the code string in FIG.35(a), respectively. In some cases, when the code string (a) istransformed to the code string (b), these information may be transformed(i.e., the transformation from information 3201 to information 3261 andthe transformation from information 3202 to information 3262).

In FIG. 35(b), 3203 denotes a bit inserted by the bit inserting process.Since the bit string subsequently to the inserted bit is shiftedbackward by the bit inserting process, a part of a code stringimmediately before the information to be inserted at a predeterminedposition is shifted so that the information is inserted at thepredetermined position. For example, assuming that the total of thenumbers of inserted bits from the synchronization code 3205 immediatelybefore the information 3201 is Ns1, Ns1 bits indicated by sign 3221 inFIG. 35(a) immediately before the information 3201 may be shifted to theportion of sign 3231 in FIG. 35(b) immediately after the information3201.

If information such as a pointer representative of a specific positionin a code string is contained in information 3201 and/or 3202, this maybe transformed. Specifically, for example, if information representativeof the position indicated by arrow 3241 is contained in information3201, the information representative of the position in information 3261is transformed so as to indicate the position representative of arrow3251 after the position by the number Ns1 of the inserted bits.

Seventh Preferred Embodiment

The seventh preferred embodiment of the present invention will bedescribed below. In the preceding preferred embodiments, while stuffingbits have been inserted into a dynamic image signal to be encoded,stuffing bits are inserted into a dynamic image signal as well as avoice signal to be encoded in the seventh preferred embodiment.

FIG. 36 shows the whole construction of the seventh preferred embodimentof a dynamic image or voice coding system according to the presentinvention. A dynamic image signal 101A and a voice signal 102A, whichare to be compression-encoded, are inputted to a dynamic image codingsystem 111A and a voice coding system 112A, respectively. Then, thesesignals are compressed to output a dynamic image code string 121A and avoice code string 122A. The constructions of the dynamic image codingsystem and the voice coding system are detailed in a literature(“International Standard of Multimedia Coding” by Hiroshi Yasuda,Maruzen (1991)) and so forth, so that the descriptions thereof areomitted herein.

The dynamic image code string 121A and the voice code string 122A,together with a data code string 103A, are multiplexed by means of amultiplexing unit 130A to output a multiplexed code string 135A.

FIG. 36 shows the whole construction of a dynamic image/voice decodingsystem corresponding to the dynamic image/voice coding system of FIG.35. A multiplexed code string 185A outputted from the dynamicimage/voice coding system is demultiplexed by means of a demultiplexingunit 180A to output a dynamic image code string 171A, a voice codestring 172A and a data code string 173A. The dynamic image code string171A and the voice code string 172A are inputted to a dynamic imagedecoding system 161A and a voice decoding system 162A to be decodedtherein, respectively, to output a reconstructed dynamic image signal151A and a reconstructed voice signal 152A.

The operation of the seventh preferred embodiment will be describedbelow.

FIGS. 38(a), 38(b) and 38(c) show three examples of the dynamic imagecode string 121A. The coding in the dynamic image coding system 111A iscarried out for each VOP (also referred to as a picture, a frame, or afield) to prepare a dynamic image code string 121A. The picture isdivided into small regions called macro blocks to be encoded.

The dynamic image code string of a single VOP starts from a VOP startcode (VSC in the drawing) (also referred to as a picture start code),which is a uniformly decodable synchronization code. The VOP start codeis followed by a VOP header (VH in the drawing) (also referred to as apicture head). The VOP header contains information representative oftime of the VOP, a VOP coding mode, a VOP quantization step size and soforth. The VOP header is followed by coding data of macro blocks.

FIG. 38(a) shows an example of a code string, in which the VOP isdivided into coding units called video packets (also called slices,GOBs) to be encoded. Each of the video packets comprises one macro blockor a plurality of macro blocks. For example, in a case where the dynamicimage coding is carried out using the prediction over a plurality ofmacro blocks, such as the prediction of a motion vector on the basis ofthe motion vectors of adjacent macro blocks, the prediction may becarried out only on the basis of those of the macro blocks contained inthe same video packet so that other video packets are not under theinfluence of a transmission line error.

Each of the code strings of the respective video packets other than theinitial video packet of the VOP starts from a resynchronizing marker(RM) (also called a slice start code or a GOB start code), which is auniformly decodable synchronization code, and a video packet header(VPH) (also called a slice header or a GOB header), which are followedby data of the respective macro blocks. The video packet header containsa macro block number (or a slice number or a GOB number) representativeof the position of the initial macro block of the video packet, aquantization step size of the video packet, and so forth. Moreover, thevideo packet header may contain important information such as a VOPheader information.

FIG. 38(b) shows an example of a code string, in which a dynamic imagecode string is divided into two parts, i.e., information relating to aprediction mode and/or a motion vector, and information relating to aresidual signal of a motion-compensated adaptive prediction or anorthogonal transformation coefficient derived by orthogonal transformingthe residual signal, to be encoded. In the code strings of therespective video packets, the information relating to the predictionmode and/or the motion vector (Motion in the drawing) is arranged in thefront portion (immediately after the video packet header or the VOPheader in the shown example), and the information relating to theprediction residual DCT coefficient (Texture in the drawing) is arrangedin the rear portion. The two kinds of information are separated by amotion marker (MM in the drawing).

FIG. 38(c) shows an example of a code string in a dynamic image codingsystem for also encoding information relating to the shape of an imageto be encoded. In the drawing, Shape denotes shape information relatingto the shape, and is arranged before the information (Motion) relatingto the prediction mode and/or the motion vector in the respective videopacket (immediately after the video packet header or the VOP header inthe shown example). The shape information (Shape) and the information(Motion) relating to the prediction mode and/or the motion vector areseparated by a shape marker (SM in the drawing).

In the dynamic image code string of FIG. 38, synchroni-zation codes,such as start code and resynchronizing markers, may be arranged at thepositions defined by integer times of a certain number of bits. FIG. 39shows an example that the VOP start codes (VSC) and the resynchronizingmarkers (RM), which are arranged at the initial portions of therespective video packets, are arranged at the positions defined byinteger times of N bits. By such a process, the number of the positions,at which synchronization codes are detected by means of a decoder, canbe decreased to 1/N in comparison with a coding system for arrangingsynchronization codes at optional bit positions. Thus, thesynchronization detecting process in the decoding system can besimplified, and the probability of a phenomenon called a pseudosynchronization that a transmission line error produces the same bitpattern as a synchronization code to erroneously detect thesynchronization code, can be decreased to 1/N, so that the quality of adecoded image can be improved when the transmission line error occurs.

In order to arrange synchronization codes at given positions thereof,stuffing bits (Stuffing bits in FIG. 39(a)) are inserted betweeninformation immediately before a synchronization code and thesynchronization code. FIG. 39(b) shows an example of a code table ofstuffing bits when N=8. These stuffing bits are characterized in thatthe length of the stuffing bits, which can be uniformly decoded in thebackward direction of the code string, can be identified by a decodingsystem, unlike conventional stuffing bits, which has been often used andall of which are “0”. In the example of FIG. 39(b), the initial bit ofthe stuffing bits is “0”, and other bits thereof are “1”. Therefore, itcan be determined that the last bit of the stuffing bits, i.e., theinitial bit of “0” viewed in the backward direction from the bitimmediately before the synchronization code, is the initial bit of thestuffing bits.

Thus, since the position of the initial bit of the stuffing bits can beidentified, it is impossible to detect that a transmission line error ismixed into a code string in a decoding system. When a code string iscorrectly decoded, the decoding end position of data immediately beforethe stuffing bits should be coincident with the starting position of thestuffing bits. If the decoding end position is shifted from the startingposition of the stuffing bits, it may be determined that a transmissionline error is mixed into a code string, and the code string may not beused for decoding.

In addition, in a case where the backward decoding is carried out usinga variable length code which can also be decoded in a backward directionof a code string, it is required to identify the starting position ofthe reverse decoding in the decoding system. The decoding startingposition of the stuffing bits is a bit immediately before the stuffingbits. However, in the case of conventional stuffing bits, e.g., all ofwhich have the same value, the length thereof can not be identified, sothat the starting position of the backward decoding can not bedetermined by the decoding system. On the other hand, in the case of thestuffing bits of FIG. 39, the position of the initial bit canidentified, so that the starting position of the reverse coding can beidentified.

In addition, in a case where the synchronization code is a code wordcontaining a lot of “0”s, such as “00000000000000001”, there is aproblem in that the probability that the conventional stuffing bits, allof which are “0”, are the same bit pattern as the synchronization codeif an error is mixed is high, so that a pseudo synchronization is easilyproduced. On the other hand, in the case of the stuffing bits of FIG.39, all of the bits are “1” except for the initial bit, and the hummingdistance from the synchronization code containing a lot of “0”s isgreat, so that there is a low probability that a pseudo synchronizationwill occur.

Furthermore, in addition to the VOP start code and the resynchronizingmarker, a motion marker (MM) and a shape marker (SM) may be arranged atbit positions defined by integer times of the number of bits, and thestuffing bits of FIG. 39(b) may be arranged before the motion marker andthe shape marker. Thus, the error detection and the backward decodingcan also be carried out with respect to the shape information, theprediction mode, the motion vector information and so forth.

FIG. 40 shows an example of a multiplexer 130A. In the example of FIG.40, the multiplexing process is carried out in two stages called anadaptation layer 103A and a multiplex layer 1032A. The inputs to theadaptation layer 1031A include a dynamic image code string 121A, a voicecode string 122A and a data code string 103A. The outputs 1041A, 1042Aand 1043A processed by the adaptation layer are inputted to themultiplex layer 1032A. The output of the multiplex layer 1032A is amultiplexed code string 135A.

FIG. 41 shows an example of the output code string 1041A derived byprocessing the dynamic image code string 121A by the adaptation layer.The process by the adaptation layer is carried out for each unit calledAL_SDU (also called an access unit), which is obtained by dividing thedynamic image code string 121A into certain units. The output of theprocess of an AL_SDU is called AL_PDU. FIG. 41 shows the construction ofan AL_PDU. Each of AL_PDUs has an AL header (AL_header). The AL headermay contain, e.g., information representative of AL_PDU numbers,attributes, dynamic image coding mode, multiplexing modes and so forth.The AL header is followed by an AL_SDU serving as an AL payload.Moreover, the AL_SDU may be followed by a check bit for checking whethera transmission line error is mixed into the AL_PDU, such as a CRC checkbit.

In the adaptation layer, the same process is carried out for the voicecode string 121A and the data code string 103A, to output AL_PDUs 1043Aand 1043A for the voice code string and the data code string. However,the length and presence of each of the information inserted into the ALheader and the CRC check bit may be different from those of the AL_PDU1041A for the dynamic image code string.

The AL_PDUs 1041A, 1042A and 1043A prepared by the adaptation layer aremultiplexed by the multiplex layer. The multiplexing is carried out foreach unit called MUX_PDU. FIGS. 42(a) through 42(c) show examples ofmultiplexed MUX_PDUs. Each of the MUX_PDUs has a multiplexedsynchronization code (MUX flag) and a multiplexed header (MUX header).The multiplexed header may contain information representative of thekind of the output of the adaptation layer multiplexed to the MUX_PDU,the way of multiplexing, the length of the MUX_PDU and so forth.

FIG. 42(a) shows an example of the insertion of an AL_PDU into aMUX_PDU.

FIG. 42(b) shows an example of the division of an AL_PDU into aplurality of MUX_PDUs (two MUX_PDUs in the shown example). In this case,the multiplexing header may contain an information indicating where thedivided AL_PDU contained in the MUX_PDUs exists in the whole AL_PDU, andan information indicating that the divided AL_PDU is the initial or lastdivided AL_PDU.

FIG. 42(c) shows an example of the insertion of a plurality of AL_PDUsinto a MUX_PDU. In the shown example, an AL_PDU of a dynamic image codestring (Video AL_PDU) and an AL_PDU of a voice code string (AudioAL_PDU) are combined to be multiplexed. In this case, the multiplexheader may contain information representative of the boundaries of theplurality of AL_PDUs contained in the MUX_PDU. Alternatively, theboundaries of the AL_PDUs may have identification data representative ofthe boundaries.

As described above, in the adaptation layer, a code string is dividedinto AL_SUDs or access units to be processed. FIG. 43 shows examples ofmethods for dividing a dynamic image code string in the adaptationlayer.

FIG. 43 shows examples that an access unit comprises a VOP. FIGS. 43(a)through 43(c) correspond to dynamic image code strings of FIGS. 38(a)through 38(c), respectively.

FIG. 44 shows examples that an access unit comprises a video packet.FIGS. 44(a) through 44(c) correspond to dynamic image code strings ofFIGS. 38(a) through 38(c), respectively.

In a case where the video packet is divided into the shape information,the motion vector information, the DCT coefficient information and soforth as shown in FIGS. 38(b) and 38(c), the access unit may be dividedso as to correspond thereto. FIG. 45 shows such examples. FIGS. 45(a)and 45(b) correspond to dynamic image code strings of FIGS. 38(b) and38(c). For each of the shape information (Shape), the information(Motion) relating to the predication mode and the motion vector and theinformation (Texture) relating to the residual signal and the DCTcoefficient thereof, a motion marker (MM) or a shape marker (SM), whichare representative of the boundary thereof, are used to form an accessunit.

As described above, in a case where the multiplexed layer containsmultiplexed synchronization codes, AL boundary identification data andso forth, which are representative of the boundaries of the MUX_PDU andAL_PDU, the starting positions of the respective access units can bedetermined on the basis of these patterns, data and so forth. In thiscase, the synchronization code at the head of the access unit may beremoved from the dynamic image coding. FIG. 46 shows examples that anaccess unit comprises a VOP. In this case, the VOP start code at thehead of the VOP may be removed. FIG. 47 shows examples that an accessunit comprises a video packet. In this case, the VOP start code and theresynchronizing marker at the heads of the respective video packets maybe removed. FIG. 48 shows examples that an access unit is formed foreach of the shape information (Shape), the information (Motion) relatingthe prediction mode and the motion vector and the information (Texture)relating to the residual signal and the DCT coefficient thereof. In thiscase, the VOP start code and the resynchronizing marker, which arearranged at the head of the video packet, and the motion marker (MM) andthe shape marker (SM), which are representative of the boundaries ofShape, Motion and Texture, may be removed.

As shown in FIG. 49, an access unit may contain a single packet or aplurality of video packets. In this case, as shown in FIG. 49(b), onlythe VOP start code or the resynchronizing marker at the head of theaccess unit may be removed. Similarly, with respect to the dynamic imagecode strings of FIGS. 38(b) and 39(c), an access unit may comprise aplurality of video packets.

In a case where the video packet is divided into Shape, Motion andTexture to be encoded as shown in FIGS. 38(b) and (c), an access unitmay comprises Shapes, Motions and Textures of a plurality of videopackets. In FIG. 50, such a process is carried out for the code stringof FIG. 38(b), and an access unit comprises Motions and Textures. A VOPheader and a video packet are arranged before Motion for each videopacket.

The unit forming an access unit by combining Motions and Textures may bea VOP unit or a plurality of optional video packets.

In such an access unit, synchronization codes may be arranged at theboundaries of Motion and Texture of each video packet. In FIG. 50(b), asynchronization code (RM) is arranged between Motions, and in FIGS.50(c) and 50(d), synchronization codes (RM) are arranged between Motionsand between Textures. Moreover, in the example of FIG. 50(d), asynchronization code (VSC) is also arranged at the head of each accessunit. Different synchronization codes may be used for Motion andTexture. For example, a motion marker may be used for Motion, and aresynchronizing marker may be used for Texture.

Furthermore, also with respect to the dynamic image code string of FIG.38(c), Shape, Motion and Texture data are combined to form an accessunit.

As described above, if code strings of different properties, such asShape, Motion and Texture, are combined to form an access unit to carryout different error protections (e.g., an error correcting code, anerror detecting code, retransmission) for each access unit, it ispossible to carry out error protections in accordance with therespective properties, and it is possible to improve the quality of adecoded image when a transmission line error occurs. In general, if atransmission line error is mixed into the shape information (Shape), themode information and the motion vector information (Motion), the qualityof a decoded image may be greatly deteriorated. Therefore, a strongerror protection, such as the use of error correcting codes resistant toShape and Motion, may be carried out. On the other hand, even if atransmission line error is mixed into a prediction residual signal(Texture), the picture quality is not so greatly deteriorated.Therefore, the error protection may not be so strong, so that theredundancy due to error correcting codes and error detecting codes canbe lowered.

In the examples for removing synchronization codes of a dynamic imagecode string, the synchronization code contained in the dynamic imagecode string may be removed by the multiplexer 130A, or the dynamic imagecode string 121A, from which the synchronization code has been removedby the image encoder 111A, may be delivered to a multiplexer.

In either cases of FIGS. 43 through 50, the length of each access unitmay be integer times (e.g., byte unit) as large as a predeterminedlength. As shown in the example of FIG. 41, when a dynamic image codestring contains stuffing bits before a resynchronizing marker and astart code and when each of video packets and VOPs comprises units of Nbits (e.g., byte), if an access unit contains the stuffing bits, thelength of the access unit can be integer times (byte units or the like)as large as a predetermined length.

If such a process is not carried out for a dynamic image code string,stuffing bits may be inserted at the end of each access unit so that thelength of the access unit is integer times (byte units or the like) aslarge as a predetermined length. The stuffing bits of FIG. 39(b) may beused. In this case, similar to the stuffing bits inserted into thedynamic image code string, an error mixed into a code string can bedetected using the stuffing bits. In addition, stuffing bits may beadded to code strings for voice and data other than dynamic image codestrings so that the length of the access unit is integer times (byteunits or the like) as large as a predetermined length.

In the multiplex layer, when the same bit pattern as a multiplexedsynchronization code exists in a multiplexed payload, it may beerroneously determined by a demulti-plexer that this bit pattern is amultiplexed synchroniza-tion code, so that a pseudo synchronization(also called emulation), in which the boundary of MUX_PDU is erroneouslydetected, may be produced. When a dynamic image code string, in whichthe same bit pattern as synchronization codes (VOP start codes,resynchronizing markers and so forth) in the dynamic image code stringdoes not exist at the portions other than the synchronization codes, isproduced by a dynamic image encoder, it is possible to detect whether apseudo synchronization occurs in the multiplex layer using a dynamicimage synchronization code.

The head position of a MUX_PDU payload is matched with the head positionof an AL_PDU to form a MUX_PDU. All of the examples shown in FIG. 42have such a construction. Then, a dynamic image synchronization code isinserted into the head of an AL_SDU (an access unit). Thus, amultiplexed synchronization code is adjacent to the dynamic imagesynchronization code via a multiplexed header and an AL header. If amultiplexed synchronization code is erroneously detected by ademultiplexing unit, it tends to detect a multiplexed header, an ALheader and a dynamic image synchronization code, which are adjacent tothe multiplexed synchronization code. However, since the detectedmultiplexed synchronization code is a pseudo synchronization, it isdetermined that the multiplexed header, the AL header and the dynamicimage synchronization code exist, and quite different information existat the locations, at which the decoding of these headers and pattern hasbeen carried out. Therefore, it is determined whether the multiplexedheader, the AL header and the dynamic image synchronization code, whichhave been decoded by the demultiplexer, are correct information. If itis determined that they are incorrect, it is determined that thedetected multiplexed synchronization code is a pseudo synchronization.

FIG. 52 shows a second example of a multiplexer. In this example, themultiplexing is carried out in two hierarchies of a Flex Mux layer and aTrans Mux layer. The Flex Mux layer is divided into an adaptationsublayer (AL) and a multiplexing layer (Mux sublayer), and the Trans Muxlayer is divided into a protection sublayer (Protection Layer) and aTrans Mux sublayer (Trans Mux Layer).

FIG. 53 shows an example of a code string produced by a Flex Mux layer.Reference number 1061A denotes a code string comprising an adaptationsublayer, and 1062A denotes a code string comprising a multiplexingsublayer. The adaptation sublayer has an AL header (Header) 1065Acontaining information representative of the kind of multiplexedinformation and time, and a payload (Payload) 1066A, such as amultiplexed dynamic image code string, a voice code string, and a datacode string. The payload 1066A is multiplexed to produce an AL_PDU. Ifnecessary, In the multiplexing sublayer, an index 1068A representativeof the kind of the AL_PDU and a channel number is combined with aninformation (length) 1069A representative of the length of the AL_PDU toproduce a Flex Mux_PDU.

The Flex Mux_PDU produced in the Flex Mux layer is inputted to the TransMux layer. The Trans Mux layer may comprises the multiplexer of FIG. 40.In this case, a protection sublayer corresponds to the adaptation layer1031A of FIG. 40, and a Trans Mux sublayer corresponds to themultiplexing layer 1032A. Alternatively, the Trans Mux sublayer maycomprises the construction of FIG. 40 so as to use no protectionsublayer.

In a case where a plurality of video packets are inserted into an accessunit as the example shown in FIG. 49, he boundary of an access unit andthe arrangement of resynchronizing markers in a frame may be as shown inFIG. 54. In FIG. 54, a white circle denotes a macro block of aresynchronizing marker (i.e., the initial macro block of a videopacket), and a gray circle denotes the position of the initial macroblock in an access unit. FIG. 54 shows an example of a picture which hasa person with a background. In such a picture, since the informationrepresentative of the person is more important than that of thebackground portion, it preferably has a high resistance to atransmission line error. Therefore, many resynchro-nizing markers arearranged in the personal portion to decrease the video packet intervalsso as to make a quick recovery from the transmission line error toenhance the error resistance. On the other hand, since the importance ofthe background portion is not so high, there is no problem if the numberof the resynchronizing markers is decreased to increase the video packetintervals.

Moreover, in a coding system for encoding a frame in the order of araster scan from an upper-left macro block to a lower-right macro block,an error mixed into a certain macro block has an influence on alower-right macro block. In particular, if the error has an influence onan important region, the picture quality is deteriorated. Therefore, amacro block, from which the important region starts, may be set to bethe initial macro block in an access unit so that an error mixed intoanother access unit does not have an influence on the important region.In the example shown in FIG. 54, the macro blocks at the left end of theperson serving as an important region are the initial macro blocks ofthe access unit.

If the strength of error protection can be switched in an access unit,the error protection may be switched in accordance with the importanceof a region in a frame. FIG. 55 shows an example of such a switching. InFIG. 55, a light gray region denotes a region (High QoS), in which astrong error protection is carried out, and is assigned to a personalportion serving as a more important information. FIG. 56 showsconstitutional examples of access units corresponding thereto. In FIG.56, a light gray portion corresponds to the light gray macro block ofFIG. 55, and the error protection is strongly carried out for thisportion.

In a case where a video packet is divided into Motion, Texture and soforth to be encoded, as shown in FIG. 56(b), Motions may be insertedinto the first half of an access unit, Textures may be inserted into thesecond half thereof, and important regions light-grayed in FIG. 55 maybe arranged in the first halves thereof.

Alternatively, as shown in FIG. 55(c), Motions and Textures may bearranged in different access units, respectively, and the first halvesof the respective access units may be more strongly protected againsterrors. Thus, more important Motion portions of code strings of animportant region may be more strongly protected against errors.

If the arrangement of resynchronizing markers and the construction ofaccess units are as described above, it is possible to provide a morestrong error resistance by a small overhead (redundancy). In general, ifresynchro-nizing markers and strong error protection are used, theoverhead is increased. However, if more resynchronizing markers areassigned to a person or the like serving as an important information toenhance the error protection, and if less resynchronizing markers areassigned to a region, which is not so important, such as a background,to weaken the error protect, it is possible to provide a more strongerror resistance to an important information by the same mean overhead,in comparison with the assignment of resynchronizing marker and theerror protection which are totally uniformly carried out.

Moreover, as the personal portion of FIG. 55, when many resynchronizingmarkers are assigned, the length of a video packet is very short.Therefore, if each video packet is assigned to an access unit, theoverhead due to the AL header, the multiplexing header, the multiplexedsynchronization code and so forth is very great. In this case, as shownin FIG. 49, if a plurality of video packets are inserted into an accessunit, the overhead can be decreased.

What is claimed is:
 1. A coding system comprising: multiplexing meansfor multiplexing kinds of compressed codes, which are obtained bycompression coding an input signal, to produce a multiplexed codestring; code string assembling means for inputting said multiplexed codestring to assemble an output code string, said code string assemblingmeans inserting a synchronization code into any one of a plurality ofpredetermined periodic synchronization code inserting positions in saidoutput code string; and code string transforming means for transforminga code string other than said synchronization code, which is arranged atsaid synchronization code inserting position in said output code string,so that a Hamming distance from said synchronization code is equal to orgreater than a predetermined value.
 2. A coding system comprising:multiplexing means for multiplexing kinds of compressed codes, which areobtained by compression coding an input signal, to produce a multiplexedcode string; code string assembling means for inputting said multiplexedcode string to assemble an output code string, said code stringassembling means inserting a synchronization code into any on e of aplurality of predetermined periodic synchronization code insertingpositions in said output code string, and suitably inserting a stuffingbit into said output code string; and code string transforming means fortransforming a code string other than said synchronization code, whichis arranged at said synchronization code inserting position in saidoutput code string, so that a Hamming distance from said synchronizationcode is equal to or greater than a predetermined value.
 3. A codingsystem comprising: multiplexing means for multiplexing kinds ofcompressed codes, which are obtained by compression coding an inputsignal, to produce a multiplexed code string; and code string assemblingmeans for inputting said multiplexed code string to assemble an outputcode string, said code string assembling means predetermining aplurality of synchronization code inserting positions arrangedperiodically in said output code string, inserting informationindicating a boundary of said multiplexed code string, and inserting asynchronization code into any one of said plurality of synchronizationcode inserting positions; and code string transforming means fortransforming a code string other than said synchronization code, whichis arranged at said synchronization code inserting position in saidoutput code string, so that a Hamming distance from said synchronizationcode is equal to or greater than a predetermined value.
 4. A codingsystem comprising: multiplexing means for producing a multiplexed codestring comprising a plurality of compressed codes, each having avariable length; and code string assembling means for assembling anoutput code string using the multiplexed code string produced by themultiplexing means, wherein the code string assembling means inserts astuffing bit and a synchronization code into any one position of aplurality of predetermined periodic positions in said output codestring, thereby outputting the output code string having an order of themultiplexed code string, the stuffing bit, and the synchronization code.5. A coding system comprising: multiplexing means for producing amultiplexed code string comprising a plurality of compressed codes, eachhaving a variable length; and code string assembling means forassembling an output code string using the multiplexed code stringproduced by the multiplexing means, said code string assembling meanspredetermining a plurality of synchronization code inserting positionsarranged periodically in said output code string, inserting informationindicating a boundary of said multiplexed code string, and inserting astuffing bit and a synchronization code into any one of said pluralityof synchronization code inserting positions in said output code string,wherein the code string assembling means outputs the output code stringhaving an order of the multiplexed code string, the stuffing bit, andthe synchronization code.
 6. A coding system comprising: multiplexingmeans for producing a multiplexed code string comprising a plurality ofcompressed codes, each having a variable length; and code stringassembling means for assembling an output code string using themultiplexed code string produced by the multiplexing means, said codestring assembling means inserting a stuffing bit and a synchronizationcode into any one of a plurality of predetermined periodicsynchronization code inserting positions in said output code string,wherein the code string assembling means outputs the output code stringhaving an order of multiplexed code string, the stuffing bit, and thesynchronization code.
 7. A coding system as set forth in any one ofclaims 4 through 6, wherein said multiplexing means multiplexes acompressed code, which is compression coded for each of frames orsegments of the frames of an input image signal, for each of said framesor said segments of the frame, and wherein said code string assemblingmeans inserts a synchronization code into a synchronization codeinserting position immediately after the end portion of the compressedcode for each of said frames or said segments of the frame.
 8. A codingsystem as set forth in any one of claims 4 or 5 which further comprisescode string transforming means for transforming a code string other thansaid synchronization code, which is arranged at said synchronizationcode inserting position in said output code string, so that a Hammingdistance from said synchronization code is equal to or greater than apredetermined value.
 9. A coding method comprising: a step ofmultiplexing kinds of compressed codes, which are obtained bycompression coding an input signal, to produce a multiplexed codestring; a step of assembling an output code string by inputting saidmultiplexed code string, and by inserting a synchronization code intoany one of a plurality of predetermined periodic synchronization codeinserting positions in said output code string; and a step oftransforming a code string other than said synchronization code, whichis arranged at said synchronization code inserting position in saidoutput code string, so that a Hamming distance from said synchronizationcode is equal to or greater than a predetermined value.
 10. A codingmethod comprising: a step of multiplexing kinds of compressed codes,which are obtained by compression coding an input signal, to produce amultiplexed code string; a step of assembling an output code string byinputting said multiplexed code string to assemble an output codestring, by inserting a synchronization code into any one of a pluralityof predetermined periodic synchronization code inserting positions insaid output code string, and by suitably inserting a stuffing bit intosaid output code string; and a step of transforming a code string otherthan said synchronization code, which is arranged at saidsynchronization code inserting position in said output code string, sothat a Hamming distance from said synchronization code is equal to orgreater than a predetermined value.
 11. A coding method comprising: astep of producing a multiplexed code string comprising a plurality ofcompressed codes, each having a variable length; and a step ofassembling an output code string using the multiplexed code string, byinserting a stuffing bit and a synchronization code into any one of aplurality of predetermined periodic synchronization code insertingpositions in said output code string, wherein said output code stringincludes an order of the multiplexed code string, the stuffing bit, andthe synchronization code.
 12. A coding method comprising: a step ofmultiplexing kinds of compressed codes, which are obtained bycompression coding an input signal, to produce a multiplexed codestring; a step of assembling an output code string by inputting saidmultiplexed code string, by predetermining a plurality ofsynchronization code inserting positions arranged periodically in saidoutput code string, by inserting a synchronization code into any one ofa plurality of predetermined periodic synchronization code insertingpositions in said output code strings, and by inserting a stuffing bitinto said output code string; and a step of transforming a code stringother than said synchronization code, which is arranged at saidsynchronization code inserting position in said output code string, sothat a Hamming distance from said synchronization code is equal to orgreater than a predetermined value.
 13. A coding method comprising: astep of multiplexing kinds of compressed codes, which are obtained bycompression coding an input signal, to produce a multiplexed codestring; a step of assembling an output code string by inputting saidmultiplexed code string, by predetermining a plurality ofsynchronization code inserting positions arranged periodically in saidoutput code string, inserting information indicating a boundary of saidmultiplexed code string, and inserting a synchronization code into anyone of said plurality of synchronization code inserting positions; and astep of transforming a code string other than said synchronization code,which is arranged at said synchronization code inserting position insaid output code string, so that a Hamming distance from saidsynchronization code is equal to or greater than a predetermined value.14. A coding method comprising: a step of producing a multiplexed codestring comprising a plurality of compressed codes, each having avariable length; and a step of assembling an output code string usingthe multiplexed code string, by inserting information indicating aboundary of said multiplexed code string, a stuffing bit, and asynchronization code into any one of a plurality of predeterminedperiodic synchronization code inserting positions in said output codestring, wherein a code string assembling means outputs said output codestring including an order of the multiplexed code string, the stuffingbit, and the synchronization code.
 15. A coding method as set forth inany one of claims 9, 10, 11, 12, 13, 14, wherein in said step ofmultiplexing said kinds of compressed code, said compressed code iscompression coded for each of frames or segments of the frames of aninput image signal, for each of said frames or said segments of theframe, and wherein in said step of assembling said output code string, asynchronization code is inserted into a synchronization code insertingposition immediately after the end portion of the compressed code foreach of said frames or said segments of the frames.
 16. A coding methodas set forth in any one of claims 11 or 14 which further comprises astep of transforming a code string other than said synchronization code,which is arranged at said synchronization code inserting position insaid output code string, so that a Hamming distance from saidsynchronization code is equal to or greater than a predetermined value.17. An encoder comprising: a multiplexer for multiplexing kinds ofcompressed codes, which are obtained by compression coding an inputsignal, to produce a multiplexed code string; an assembler forassembling an output code string by inputting said multiplexed codestring, and by inserting a synchronization code into any one of aplurality of predetermined periodic synchronization code insertingpositions in said output code string; and a transformer for transforminga code string other than said synchronization code, which is arranged atsaid synchronization code inserting position in said output code string,so that a Hamming distance from said synchronization code is equal to orgreater than predetermined value.
 18. An encoder comprising: amultiplexer for multiplexing kinds of compressed codes, which areobtained by compression coding an input signal, to produce a multiplexedcode string; an assembler for assembling an output code string byinputting said multiplexed code string to assemble an output codestring, by inserting a synchronization code into any one of a pluralityof predetermined periodic synchronization code inserting positions insaid output code string, and by suitably inserting a stuffing bit intosaid output code string; and a transformer for transforming a codestring other than said synchronization code, which is arranged at saidsynchronization code inserting position in said output code string, sothat a Hamming distance from said synchronization code is equal to orgreater than predetermined value.
 19. An encoder comprising: amultiplexer for producing a multiplexed code string comprising aplurality of compressed codes, each having a variable length; and anassembler for assembling an output code string using the multiplexedcode string produced by the multiplexer, by inserting a stuffing bit anda synchronization code into any one of a plurality of predeterminedperiodic synchronization code inserting positions in said output codestring, wherein the assembler outputs the stuffing bit and thesynchronization code.
 20. An encoder comprising: a multiplexer formultiplexing kinds of compressed codes, which are obtained bycompression coding an input signal, to produce a multiplexed codestring; an assembler for assembling an output code string by inputtingsaid multiplexed code string, by predetermining a plurality ofsynchronization code inserting positions arranged periodically in saidoutput code string, by inserting a synchronization code into any one ofa plurality of predetermined periodic synchronization code insertingpositions in said output code strings, and by inserting a stuffing bitinto said output code string; and a transformer for transforming a codestring other than said synchronization code, which is arranged at saidsynchronization code inserting position in said output code string, sothat a Hamming distance from said synchronization code is equal to orgreater than predetermined value.
 21. An encoder comprising: amultiplexer for producing a multiplexed code string comprising aplurality of compressed codes, each having a variable length; and anassembler for assembling an output code string using the multiplexedcode string produced by the multiplexer, by predetermining a pluralityof synchronization code inserting positions arranged periodically insaid output code string, and by inserting a stuffing bit and asynchronization code into any one of a plurality of predeterminedperiodic synchronization code inserting positions in said output codestring, wherein the assembler outputs the output code string having anorder of the multiplexed code string, the stuffing bit, and thesynchronization code.
 22. An encoder comprising: a multiplexer formultiplexing kinds of compressed codes, which are obtained bycompression coding an input signal, to produce a multiplexed codestring; an assembler for assembling an output code string by inputtingsaid multiplexed code string, by predetermining a plurality ofsynchronization code inserting positions arranged periodically in saidoutput code string, inserting information indicating a boundary of saidmultiplexed code string, and inserting a synchronization code into anyone of said plurality of synchronization code inserting positions; and atransformer for transforming a code string other than saidsynchronization code, which is arranged at said synchronization codeinserting position in said output code string, so that a Hammingdistance from said synchronization code is equal to or greater thanpredetermined value.
 23. An encoder comprising: a multiplexer producinga multiplexed code string comprising a plurality ofcompressed codes,each having a variable length; and an assembler for assembling an outputcode string using the multiplexed code string produced by themultiplexier, by predetermining a plurality of synchronization codeinserting positions arranged periodically in said output code string,inserting information indicating a boundary of said multiplexed codestring, and inserting a stuffing bit and a synchronization code into anyone of said plurality of synchronization code inserting positions insaid output code string, wherein the assembler outputs the output codestring having an order of the multiplexed code sting, the stuffing bit,and the synchronization code.
 24. An encoder as set forth in any one ofclaims 17 through 23, wherein said multiplexer compression codes foreach of frames or segments of the frames of an input image signal, foreach of said frames or said segments of the frame, and wherein saidassembler inserts a synchronization code into a synchronization codeinserting position immediately after the end portion of the compressedcode for each of said frames or said segments of the frames.
 25. Anencoder as set forth in any one of claims 19, 21, or 23, which furthercomprises a transformer for transforming a code string other than saidsynchronization code, which is arranged at said synchronization codeinserting position in said output code string, so that a Hammingdistance from said synchronization code is equal to or greater thanpredetermined value.
 26. A coding system comprising: multiplexing meansfor producing a multiplexed code string comprising a plurality ofcompressed codes, each having a variable length; and code stringassembling means for assembling an output code string by inserting astuffing bit and a synchronization code into any one position of aplurality of predetermined periodic positions in said output codestring, wherein the code string assembling means outputs the output codestring having an order of multiplexed code string, the stuffing bit, andthe synchronization code.